在列表末尾添加一个元素。
x
None(原地修改)
a = [1, 2] a.append(3) a.append([4, 5]) # 作为一个整体添加 print(a)
[1, 2, 3, [4, 5]]