# encoding = utf-8 lstop = False while lstop == False: num = int(input('输入一个任意大于1的整数(否则退出):')) if num <= 1 : lstop = True print('即将退出...') else: i = 2 while i <num: print(i) i += 1