Q. Which method clears all items from a dictionary?

A
clear()
B
remove()
C
delete()
D
empty()
Solution:

clear() removes all items, e.g., {}.clear() results in an empty dictionary.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!