while 使用example#!/usr/bin/python num = 10 run = True while run: guess = int(raw_input('Enter input : ')) if guess == num: print 'Congratulations, you guessed it.' run = False elif guess < num: print 'No, it is a little higher than that.' else: print