What is the output of print({1, 2}.isdisjoint({3, 4})) in Python?
print({1, 2}.isdisjoint({3, 4}))
Correct answer
B. True
5 views
B. True
5 views
isdisjoint is True when two sets share no elements.
Asked in: Python Interview Sets
https://docs.python.org/3/tutorial/datastructures.html#setsNot sure why the answer is B? Ask here and get an explanation.