for i in range(100): if i < 50 or i > 70: print(i) 注意: range(100) 表示 0 到 99 个数字 转载于:https://www.cnblogs.com/klvchen/p/8567373.html