Is the following Python code valid? [code] >>> a=frozenset([5,6,7]) >>> a >>> a.add(5) [/code]

Mỹ An

New member
Is the following Python code valid?
Code:
>>> a=frozenset([5,6,7])
>>> a
>>> a.add(5)
A. Yes, now a is {5,5,6,7}
B. No, frozen set is immutable
C. No, invalid syntax for add method
D. Yes, now a is {5,6,7}
 

Tìm kiếm

Back
Top