uses the enumerate(string) to create a temporary sequence : enumerate « Buildin Function « Python Tutorial






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








13.14.enumerate
13.14.1.uses the enumerate(string) to create a temporary sequence
13.14.2.uses a dictionary as the sequence to display the dictionary contents