+ 1
CAN SOMEONE EMBEDDING LIST AS A VALUE INSIDE DICTIONARY KEY.
is it possible to use List as value to a dictionary key?
6 Respostas
+ 3
No, keys must be of hashable type...
+ 2
Yes, that you can ;)
+ 1
Try it: you can...
0
I mean to use a list as a value to a key, eg:
house{toilet:[81,30],kitchen:[50,20].
something like that.
0
I have gotten the answer: as value u can use mutable elements like list and dictionary, while keys can only be immutables.
0
You can use it as avalue but you cannot use it as a key.