+ 1
What is the condition to use tuples as a key in a dictionaries?
Though tuples are immutable type,yet they cannot always be used as keys in a dictionary.
1 Respuesta
0
They also have to consist of immutable objects (all their elements must be immutable).
Here is an example code:
https://code.sololearn.com/cwPqeQ3n4SDW/?ref=app