Ask Your Question

Revision history [back]

click to hide/show revision 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[:]