import time i = 1 while i <= 3: print i # 输出i i += 1 time.sleep(1) # 休眠1秒
Time 模块
原文:http://www.cnblogs.com/mango-lee/p/7127694.html