python for loop with integer index