| 1 | initial version |
That's how python works. You can use
q=copy(p)
or another popular idiom in python is to take a "slice" of a list, which is a copy, that happens to cover the whole list:
q=p[:]
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.