Python 列表/数组方法
fruits リストをコピー:
fruits = ['apple', 'banana', 'cherry', 'orange'] x = fruits.copy()
実行例
copy() メソッドは指定されたリストのコピーを返します。
list.copy()
无参数。