can a key be of any type(data type) in a dictionary?if yes,how are these stored in memory ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

can a key be of any type(data type) in a dictionary?if yes,how are these stored in memory ?

please clear my confusion...

26th Nov 2017, 7:38 AM
Vaidhyanathan S M
Vaidhyanathan S M - avatar
1 Answer
+ 1
You can use any immutable type. https://docs.python.org/3/tutorial/datastructures.html
26th Nov 2017, 8:33 AM
ChaoticDawg
ChaoticDawg - avatar