holdtom
让我们先举个例子list1=[1,2,3,4]list2=list1 (that means they points to same object)if we do list1=list1+[5] it will create a new object of listprint(list1) output [1,2,3,4,5] print(list2) output [1,2,3,4]but if we append then list1.append(5) no new object of list createdprint(list1) output [1,2,3,4,5] print(list2) output [1,2,3,4,5]extend(list) also do the same work as append it just append a list instead of a single variable