What will be the output of the following Python code? [code] >>> a={1,2,3} >>> b=a.copy() >>> b.add(4) >>> a [/code]

Huyền Thu

New member
What will be the output of the following Python code?
Code:
>>> a={1,2,3}
>>> b=a.copy()
>>> b.add(4)
>>> a
A. {1,2,3}
B. Error, invalid syntax for add
C. {1,2,3,4}
D. Error, copying of sets isn’t allowed
 

Tìm kiếm

Back
Top