If you copy a list into another variable, and then change the second one, the first gets changed aswell, for example:
>>> a = [10, 40, 30, 20] >>> b = a >>> b.sort() >>> a [10, 20, 30, 40] >>> b [10, 20, 30, 40] or: >>> a = [10, 40, 30, 20] >>> b = a >>> b[0] = 99 >>> a [99, 40, 30, 20] >>> b [99, 40, 30, 20] this happens with dictionary's too, but not with intergers, it is not that this is a problem because I can just use... >>> b = a[:] ...but I wonder if there is any logic behind this, I cannot find a practical use for it, just problems. thx, Righard _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor