This is not pythonic way. Pythonic way described here: http://docs.python.org/2/tutorial/controlflow.html#for-statements