If i were to run this code:
def function(y): y.append(\'yes\') return y example = list() function(example) print(example)
Why woul
The easiest way to modify the code will be add the [:] to the function call.
def function(y): y.append('yes') return y example = list() function(example[:]) print(example)