Copying objects

Christian Theune ct at gocept.com
Wed Mar 7 18:43:44 EST 2001


How do I create a copy of an Instance?

I tried following:

a = [1, 2, 3, 4]
b = a

!will not work, because referencing

I found this tip:

b = a[:]

!works not, too.

How to do else?

Best regards.

Christian Theune



More information about the Python-list mailing list