Python Set copy() Method
Example
Copy thefruits
set:
fruits = {"apple", "banana", "cherry"}
x = fruits.copy()
print(x)
Try it Yourself »x = fruits.copy()
print(x)
Definition and Usage
Thecopy()
method copies the set.
Syntax
set.copy()
Parameter Values
No parameters