Is this a refrence issue?

Scott David Daniels scott.daniels at acm.org
Thu Dec 29 12:38:45 EST 2005


KraftDiner wrote:
> I have a list and want to make a copy of it and add an element
> to the end of the new list, but keep the original intact....

Nobody has mentioned the obvious yet:

     tmp = myList + [something]

--Scott David Daniels
scott.daniels at acm.org



More information about the Python-list mailing list