CBSE Class 11 Computer Science
Question 20 of 39
Tuples and Dictionary — Question 21
Back to all questionsThe correct method to clear all elements from a dictionary is clear(), not clears().
The corrected code is:
d1.clear()The correct method to clear all elements from a dictionary is clear(), not clears().
The corrected code is:
d1.clear()