Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12
A list is used as key - this is not possible, because it is not hashable. Only immutable objects can be used as keys. So it could be a solution to use tuple instead of list: dl={"a":1,1:"a",(1,"a"):"two"}
21st Nov 2019, 4:28 PM
Lothar
Lothar - avatar