break在百度翻译中意为打破 但是在python中通常与while循环一起使用 在一条语句中遇到永真循环(while True:)就需要break将程序结束 例如: while True: print("hello world") break
输出结果为 hello world
删除break将一直输出hello world
break在百度翻译中意为打破 但是在python中通常与while循环一起使用 在一条语句中遇到永真循环(while True:)就需要break将程序结束 例如: while True: print("hello world") break
输出结果为 hello world
删除break将一直输出hello world