Q33
What will be the output of the following Python code? s1=1, 2, 3, 8 s2=3, 4, 5, 6 s1|s2 s1.union(s2)
A.
{3}
{1, 2, 3, 4, 5, 6, 8}
{1, 2, 3, 4, 5, 6, 8}
B.
{1, 2, 4, 5, 6, 8}
{1, 2, 4, 5, 6, 8}
{1, 2, 4, 5, 6, 8}
C.
{3}
{3}
{3}
D.
{1, 2, 3, 4, 5, 6, 8}
{1, 2, 3, 4, 5, 6, 8}
Answer{1, 2, 3, 4, 5, 6, 8}
Answer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board