python创建二维列表
时间:2021-04-19 14:37:17
收藏:0
阅读:20
ls = [[] for i in range(7)]
print(‘ls==‘, ls)
for k in range(1, 7): # 1-9
test = [i for i in range(k)]
ls[k] = test
print(‘ls==‘, ls)
运行结果:
原文:https://www.cnblogs.com/Acapplella/p/14676469.html
评论(0)