for i in range(10): tnt += i print(tnt)
上述代码执行后其输出相当于求1-10的和(包含10)
上述代码执行后其输出相当于求1-10的和(不包含10)
上述代码执行后其输出相当于求0-10的和(不包含10)
上述代码执行时将触发异常