python increment variable inside loop