Copy List

Tim Williams tim at tdw.net
Wed Jul 18 08:38:14 EDT 2007


On 18/07/07, Robert Rawlins - Think Blue
<robert.rawlins at thinkbluemedia.co.uk> wrote:

>
> What's the best way to create a copy of a list? I've seen several method and
> I'm not sure what to use. This will be in a class and one method creates a
> list which I then want to move to the self scope, like so:
>

listB = listA[:]

hth :)



More information about the Python-list mailing list