Vidyalelo
Python · Q83

Python Sets MCQs: Exam

Programming · Python · question 83

Q83

If a=5,6,7, what happens when a.add(5) is executed?

A.
a={5,5,6,7}
B.
a={5,6,7}
Answer
C.
Error as there is no add function for set data type
D.
Error as 5 already exists in the set

Answer: Option B

Solution

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