I want to do something like this:
myList = [10,20,30] yourList = myList.append (40)
Unfortunately, list append does not return the modified
In python 3 you may create new list by unpacking old one and adding new element:
a = [1,2,3] b = [*a,4] # b = [1,2,3,4]
when you do:
myList + [40]
You actually have 3 lists.