python“数组”

建立"数组"(List列表数据类型):

array = [value]*n

array = [[value for i in range(n)] for j in range(m)] # 二维

输出时消除列表方括号

LIST=[1,2,3]

print(", ".join(repr(e) for e in LIST))

posted @ 2020-12-09 15:35  Eunice呀  阅读(137)  评论(0)    收藏  举报