当前位置:主页 > 软件编程 > Python代码 >

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

时间:2020-12-01 12:51:47 | 栏目: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()

您可能感兴趣的文章:

相关文章