+ 1
is there any rule to declare key?
3 Respuestas
+ 1
It has to be an immutable object . Mutable objects cannot be used like list and dictionary.
So key can be string,integer etc
0
key has to be immutable, it doesn't matter int or str, but not list)
- 1
It should be string only