Vidyalelo
Python · Q67

Python Sets MCQs: Exam

Programming · Python · question 67

Q67

What will be the output of the following Python code? >>> a=1,2,3 >>> x*2 for x in a|4,5

A.
{2,4,6}
B.
Error, set comprehensions aren't allowed
C.
{8, 2, 10, 4, 6}
Answer
D.
{8,10}

Answer: Option C

Solution

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