Why does python create a reference here, not just copy the variable?

>>> j=range(0,6)
>>> k=j
>>> del j[0]
>>> j
[1, 2, 3, 4, 5]
>>> k
[1, 2, 3, 4, 5]

Shouldn't k remain the same?

-- 
Michał Bentkowski
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to