Which collection can be used as a dictionary key in Python?
Correct answer
D. tuple of immutable items
5 views
D. tuple of immutable items
5 views
Dictionary keys must be hashable; tuples of hashable items qualify.
Asked in: Python Interview Tuples
https://docs.python.org/3/tutorial/datastructures.html#tuples-and-sequencesNot sure why the answer is D? Ask here and get an explanation.