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()
for i in a:
for j in i:
print(j,end=' ')
print()
# for i in range(0,len(a)):
# j=0
# while j<len(a[i]):
# print(a[i][j],end=' ')
# j+=1
# print()
# i=0
# while i<len(a):
# for j in range(0,len(a[i])):
# print(a[i][j],end=' ')
# i+=1
# print()
# i=0
# while i<len(a):
# j = 0
# while j<len(a[i]):
# print(a[i][j],end=' ')
# j+=1
# i+=1
# print()
分别输出每一个数组(for.,while的混合使用)
最新推荐文章于 2022-04-06 21:25:11 发布