>>> for i, c in enumerate('test'): ... print i, c ... 0 t 1 e 2 s 3 t
l ="abcdefterewfds" for count, value in enumerate(l): print(value)