数组/list [‘Michael’, ‘Bob’, ‘Tracy’]

classmates = ['Michael', 'Bob', 'Tracy']
classmates[0] #第一个元素
'Michael'
classmates[-1] #最后一个元素
# 可以使用append insert pop

# 建一个大数组
a=numpy.zeros([10,20])
# 这个矩阵调用很漂亮
a[50,100]=899
# 读取也是一样的
a[50,100]

# 二维数组展平
l = [[1, 2, 3], [4, 5, 6], [7], [8, 9]]
sum(l, [])
# 参考: https://stackoverflow.com/questions/952914/how-to-make-a-flat-list-out-of-a-list-of-lists


### 添加元素
a={8}
li=[]
li.append(1)
li.extend(a)
li+=[9]
# 此时li=[1,8,9]


# 排序
li.sort()


# 新建个数组
x=list(range(len(li)))

###