Python Collection copy() Method
Example
Copy the fruits set:
fruits = {"apple", "banana", "cherry"} x = fruits.copy() print(x)
Definition and Usage
The copy() method copies the set.
Syntax
set.copy()
Parameter Value
No parameters.
Copy the fruits set:
fruits = {"apple", "banana", "cherry"} x = fruits.copy() print(x)
The copy() method copies the set.
set.copy()
No parameters.