Vidyalelo
Python · Q16

Python Sets MCQs: Exam

Programming · Python · question 16

Q16

What will be the output of the following Python code snippet? s=set([1, 2, 3]) s.union([4, 5]) s|([4, 5])

A.
{1, 2, 3, 4, 5}
{1, 2, 3, 4, 5}
B.
Error
{1, 2, 3, 4, 5}
C.
{1, 2, 3, 4, 5}
Error
Answer
D.
Error
Error

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board