+ 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.

6th Feb 2019, 5:13 PM
gauri
1 Resposta
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
6th Feb 2019, 6:38 PM
giannismach
giannismach - avatar