In Python, how to define a for loop?