If i were to run this code:
def function(y): y.append(\'yes\') return y example = list() function(example) print(example)
Why woul
Its because you called the function before printing the list. If you print the list then call the function and then print the list again, you would get an empty list followed by the appended version. Its in the order of your code.