首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >python while语句

python while语句

作者头像
py3study
发布于 2020-01-13 15:55:07
发布于 2020-01-13 15:55:07
7800
举报
文章被收录于专栏:python3python3
代码语言:javascript
复制
while 判断条件:       #在给定的判断条件为 true 时执行循环体,否则退出循环体
    执行语句
count = 0
while (count < 3):
   print ('The count is:', count)
   count = count + 1
print ("Good bye!")
The count is: 0
The count is: 1
The count is: 2
Good bye!
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019/08/15 ,如有侵权请联系 cloudcommunity@tencent.com 删除
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档