如果我要运行此代码:
def function(y): y.append('yes') return y example = list() function(example) print(example)
为什么它会返回['yes'],即使我没有直接更改变量'example',我怎么能修改代码以便'example'不受函数的影响?
python arguments function list
arguments ×1
function ×1
list ×1
python ×1