scientific-python-lectures icon indicating copy to clipboard operation
scientific-python-lectures copied to clipboard

Methods do not *return* the modified list, they just modify the original list.

Open HariharasudhanAS opened this issue 7 years ago • 0 comments

When discussing lists, I think it is imperative to mention that lists are modified in the original space. Also, when assigning one list to another, mentioning that modifications to the second list is reflected in the first list would be helpful.

l=[] 
l.append('a')
print(l)
a=l
a.append('b')
print(l)

HariharasudhanAS avatar Aug 05 '18 09:08 HariharasudhanAS