python increment variable in while loop