Indexing a Dictionary : Index : Dictionary PYTHON TUTORIALS


PYTHON TUTORIALS » Dictionary » Index »

 

Indexing a Dictionary


d = 'x':42'y':3.14'z':}
print d['x']                           42
print d['z']                           7
print d['a']                           # raises KeyError exception



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Dictionary
» Index