What is the output of the following code:
set1 = {1, 2, 3}
set2 = {3, 4, 5}
print(set1.union(set2))
set2 = {3, 4, 5}
print(set1.union(set2))
A. {1, 2, 3, 4, 5}
B. {1, 2, 3}
C. {3, 4, 5}
D. {1, 4, 5}
Answer: Option A

Join The Discussion