使用Python实现分别输出每个数组

我就废话不多说了,直接上代码吧!

a=[[1,2,3],[4,5][6,7]["a","b"",c"]]
# i=0
# while i<len(a):
#   print(a[i])
#   i+=1

# a=[[1,2,3],[4,5],[6,7],["a","b","c"]]
# for i in range(0,len(a)):
#   print(a[i])

a=[[1,2,3],[4,5],[6,7],["a","b","c"]]
for i in range(0,len(a)):
  for j in range(0,len(a[i])):
    print(a[i][j],end="")
  print()

# a=[[1,2,3],[4,5],[6,7],["a","b","c"]]
# i=0
# while i<len(a):
#   j=0
#   while j<len(a[i]):
#     print(a[i][j],end=" ")
#     j+=1
#   i+=1
# print()

# a=[[1,2,3],[4,5],[6,7],["a","b","c"]]
# i=0
# while i<len(a):
#   for b in a[i]:
#     print(b,end=" ")
#   print()
#   i+=1
#
# a=[[1,2,3],[4,5],[6,7],["a","b","c"]]
# for data in a :
#   i=0
#   while i<len(data):
#     print(data[i],end=" ")
#     i+=1
#   print()

以上这篇使用Python实现分别输出每个数组就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持云海天教程。