python nested while loop example