注意+=和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
相關文章
相關標籤/搜索