scientific-python-lectures
scientific-python-lectures copied to clipboard
Methods do not *return* the modified list, they just modify the original list.
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)