def eggs(x): x.append('hello') spam=[1,2,3] eggs(spam) print(spam)>>>[1, 2, 3, 'hello'] #spam与x指向相同列表