Single Choice
Not Set
QWhat is the output of the following union operation
set1 = {10, 20, 30, 40}
set2 = {50, 20, "10", 60}
set3 = set1.union(set2)
print(set3)
ID: #3812
Python Set MCQ
411 views
Question Info
#3812Q ID
Not SetDifficulty
Python Set MCQTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
{40, 10, ’10’, 50, 20, 60, 30}
The union() method returns a new set with all items from both sets by removing duplicates
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic