Closed manoharganta256 closed 5 years ago
Thanks for the PR!
I feel that this should be under Lists are mutable
section. Actually, I think list()
is doing exactly the same job and I feel that it's more Pythonic (of course just my personal opinion). Thus, I would mention that there is also copy
method but I wouldn't necessarily devote a new section for it.
Maybe you could mention it as an alternative under Lists are mutable
. For example:
modified = list(original) # Note list()
# Alternatively, you can use copy
# modified = original.copy()
Added copy() method in lists.ipynb along with a simple example.