a = [1,2,3] a = [0] + a print(a) [0, 1, 2, 3]
a = [1,2,3] a.insert(0,0) print(a) [0, 1, 2, 3]
Python在List开头添加元素