A
Andreas Kuntzagk
Hi,
There are three ways to (shallow)copy a list l I'm aware of:
Are there any differences? Are there more (reasonable) ways?
I think the first is the most pythonic, second looks more like this other
p-language and third requires an import, so I would prefer the first.
Do you agree?
Andreas
There are three ways to (shallow)copy a list l I'm aware of:
l2=list(l)
l2=l[:]
l2.copy.copy(l)
Are there any differences? Are there more (reasonable) ways?
I think the first is the most pythonic, second looks more like this other
p-language and third requires an import, so I would prefer the first.
Do you agree?
Andreas