uses a dictionary as the sequence to display the dictionary contents : Enumerate : Buildin Function PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Function » Enumerate »

 

uses a dictionary as the sequence to display the dictionary contents


dict = {}
string="1234"
for i,ch in enumerate(string):
    dict[i= ch
print dict


for key in dict:
    print key, '=', dict[key]



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Buildin Function
» Enumerate