Which of the following is a valid way to create an empty set in Python?
-
A
set()
Correct answer
-
B
{}
-
C
{0}
-
D
{1, 2, 3}
18 views
Explanation
The set() function creates an empty set in Python.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ