L1 = [1,2,3]
L2 = [4,5,6]
L3 = L1 + L2
print L3
[1, 2, 3, 4, 5, 6]
L1.extend(L2)
print L1
[1, 2, 3, 4, 5, 6]
L1.append(L2)
print L1
[1, 2, 3, 4, 5, 6, [4, 5, 6]]
some list operation(#quote from MIT 'introduction to computation and programming using python, Revis
最新推荐文章于 2023-08-07 16:42:52 发布