OpenStudy (anonymous):

I am using python 2.7. Suppose i create a list within a list. If i copy the whole thing using slicing operator (like list2=some_list[:] ) and make changes to the newly created list, the changes are reflected back to the original list. (But extend and append functions work perfectly! ) I can't seem to figure out why.. help!

6 years ago
Similar Questions: