Vidyalelo
Python · Q10

Python Sets MCQs: Exam

Programming · Python · question 10

Q10

What will be the output of the following code:my_set = 1, 2, 3my_set.add(4)print(my_set)

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

Answer: Option B

Solution

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