拷贝 fruits 列表:
fruits = ["apple", "banana", "cherry"]x = fruits.copy()print(x)
fruits = ["apple", "banana", "cherry"]
x = fruits.copy()
print(x)
copy() 方法返回指定列表的副本。
copy()
list.copy()
无参数。