def main(): carry_on = input('Carry on?\n') while carry_on != 'no': carry_on = input('Carry on?\n') if __name__ == '__main__': main()