What is the output of print({1, 2}.issubset({1, 2, 3})) in Python?
print({1, 2}.issubset({1, 2, 3}))
Correct answer
D. True
5 views
D. True
5 views
issubset checks whether all elements of one set are in another.
Asked in: Python Interview Sets
https://docs.python.org/3/tutorial/datastructures.html#setsNot sure why the answer is D? Ask here and get an explanation.