1、使用while循环输入 1 2 3 4 5 6 8 9 10
b= 0 while True: b +=1 if b==7: continue if b> 10: break print(b)

本文通过一个简单的Python代码示例,展示了如何使用while循环来控制程序的流程,包括如何使用continue和break语句来实现跳过某次迭代和提前结束循环。
1、使用while循环输入 1 2 3 4 5 6 8 9 10
b= 0 while True: b +=1 if b==7: continue if b> 10: break print(b)

转载于:https://www.cnblogs.com/PYlog/p/8578765.html

被折叠的 条评论
为什么被折叠?