1. Home
  2. Data Science
  3. Python
  4. Which of the following is a valid way to create an empty…

Added 4 May 2024

Which of the following is a valid way to create an empty set in Python?

  1. set() Correct answer
  2. {}
  3. {0}
  4. {1, 2, 3}

Correct answer

A. set()

18 views

MCQSEXAM

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

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs