Dictionary Keys
Dictionary keys must be hashable and equatable, i.e., must implement the Hashable
and Equatable
interfaces.
Most of the built-in types, like booleans and integers, are hashable and equatable, so can be used as keys in dictionaries.
Last updated