0
Different outputs
3 Réponses
+ 3
First of all
for i in ages:
in each times i is string not number
But different output Idk
+ 2
since the keys and values are randomly placed in dictionary unlike lists therefore you get random outputs..
for second case u can access the Dictionary by the key.. but u r trying to use 0,1 (thinking it as indices. right?) it is not possible in dictionary..
0
I don't really know semantics of Python, but I think that dictionaries are hash tables which means they are not stored in particular order, but the hash is calculated for each one of them and with the number they get, they get placed in memory.