注意+=和append()的效果同样, 以及和list=list+[6,7]区别

# What is the difference between these two pieces of code? list1 = [1,2,3,4,5] list2 = [1,2,3,4,5] def proc(mylist): mylist=mylist+[6,7] def proc2(mylist): mylist.append(6) mylist.append
相关文章
相关标签/搜索