Vidyalelo
Python · Q17

Python Sets MCQs: Exam

Programming · Python · question 17

Q17

What will be the output of the following Python code? >>> a=3,4,5 >>> a.update([1,2,3]) >>> a

A.
Error, no method called update for set data type
B.
{1, 2, 3, 4, 5}
Answer
C.
Error, list can't be added to set
D.
Error, duplicate item present in list

Answer: Option B

Solution

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