Which of the following can be used as a dictionary key?
Explanation
The only requirement to Python dictionary key is that it should be immutable, ie it cannot be modified after its definition.
Sets, lists, and dictionaries are mutable objects in Python while tuples, numbers, and strings are immutable.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes