Which of the following can be used as a dictionary key?
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
Sign Up Now
or Subscribe for future quizzes