Vidyalelo
Python · Q21

Python Sets MCQs: Exam

Programming · Python · question 21

Q21

What will be the output of the following Python code? >>> s=5,6 >>> s*3

A.
Error as unsupported operand type for set data type
Answer
B.
{5,6,5,6,5,6}
C.
{5,6}
D.
Error as multiplication creates duplicate elements which isn't allowed

Answer: Option A

Solution

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