1. Home
  2. Data Science
  3. Python
  4. What is the output of print({1, 2}.isdisjoint({3, 4})) in…

Added 25 Nov 2026

What is the output of print({1, 2}.isdisjoint({3, 4})) in Python?

print({1, 2}.isdisjoint({3, 4}))
  1. False
  2. True Correct answer
  3. None
  4. Error

Correct answer

B. True

5 views

MCQSEXAM

Explanation

isdisjoint is True when two sets share no elements.

Reference

Asked in: Python Interview Sets

https://docs.python.org/3/tutorial/datastructures.html#sets

Doubts & discussion

Not sure why the answer is B? 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