M Mỹ An New member Sep 20, 2021 #1 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}
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}
Đ Đỗ Thu Hiền New member Sep 20, 2021 #2 Answer: b Explanation: Since a frozen set is immutable, add method doesn’t exist for frozen method. Upvote 0 Downvote