I need to do in Python the same as:
for (i = 0; i < 5; i++) {cout << i;}
but I don\'t know how to use FOR in Python to get the index
In additon to other answers - very often, you do not have to iterate using the index but you can simply use a for-each expression:
my_list = ['a', 'b', 'c'] for item in my_list: print item