• + 1 comment

    1 means True while 0 means False. There is a difference when in Python 2, True is not a keyword but it is in Python 3. while True or while 1 will run your program indefinitely. while True should only be used if you have no condition for breaking out of the loop; in this case the loop should break when there are no more queries.