May-11-2021, 12:01 PM
"If fact, in any programming language for most part if you mutate something while you iterating over it you living in state of sin and you deserve whatever happens to you" -- Raymond Hettinger, Python core-developer, Transforming Code into Beautiful, Idiomatic Python
What is purpose of
What is purpose of
l2.copy()
. It creates copy but as you don't bind it to the name so it's not accessible, no pointers to it and garbage collector will destroy it. It doesn't have any effect on result of your code.>>> help(list.copy) Help on method_descriptor: copy(self, /) Return a shallow copy of the list.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.