On Wed, 2008-03-26 at 23:04 +0100, Michał Bentkowski wrote: > Why does python create a reference here, not just copy the variable?
Python, like most other oo languages, will always make references for =, unless you work on native types (numbers and strings). Instead use one of: k = j[:] or k = [i for i in j] or from copy import copy k = copy(j) or k = range(6) -- Best Regards, Med Venlig Hilsen, Thomas -- http://mail.python.org/mailman/listinfo/python-list