Tags
Asked 2 years ago
5 Aug 2021
Views 195
Janice

Janice posted

How do you declare an empty set in Python ?

How do you declare an empty set in Python ?
jessica

jessica
answered Oct 8 '21 00:00

you can create an empty set in Python, by the set() method.
please check following code :

x = set()
print(x)
print(type(x))

it will print

set()
<class 'set'>



Post Answer