运行结果是
从运行结果可以看出 当不符合assert中的断言条件 condition 程序就会中断。
修改了assert condition 的条件 使得condition为True
def example(number): assert number 20, 请重新输入 print( 20210927 ) print(example(number 10))
从运行结果可以看出当assert(condition)的条件为True的时候 会继续执行下面的程序。

运行结果是
从运行结果可以看出 当不符合assert中的断言条件 condition 程序就会中断。
修改了assert condition 的条件 使得condition为True
def example(number): assert number 20, 请重新输入 print( 20210927 ) print(example(number 10))
从运行结果可以看出当assert(condition)的条件为True的时候 会继续执行下面的程序。