I want to do something like this:
myList = [10,20,30] yourList = myList.append (40)
Unfortunately, list append does not return the modified
Don't use append but concatenation instead:
yourList = myList + [40]
This returns a new list; myList will not be affected. If you need to have myList affected as well either use .append() anyway, then assign yourList separately from (a copy of) myList.
myList
.append()
yourList