Python コレクション メソッド
fruits 集合をコピー:
fruits = {"apple", "banana", "cherry"} x = fruits.copy() print(x)
実行例
copy() メソッドは集合をコピーします。
セット.copy()
パラメータ無し。