If slicing does not create a copy of a list nor does list() how can I get a real copy of my list?
问题 I am trying to modify a list and since my modifications were getting a bit tricky and my list large I took a slice of my list using the following code tempList=origList[0:10] for item in tempList: item[-1].insert(0 , item[1]) del item[1] I did this thinking that all of the modifications to the list would affect tempList object and not origList objects. Well once I got my code right and ran it on my original list the first ten items (indexed 0-9) were affected by my manipulation in testing the