首页 > 其他 > 详细

遍历循环保留字

时间:2019-03-01 23:50:20      阅读:329      评论:0      收藏:0      [点我收藏+]

技术分享图片

技术分享图片

 

 

s="python"
while s!="":
for c in s:
if c=="t":
break
print(c,end=‘‘)
s=s[:-1]
输出结果:pypypypypyp

s="python"
while s!="":
for c in s:
if c=="t":
continue
print(c,end=‘‘)
s=s[:-1]
输出结果:pyhonpyhopyhpypyp

技术分享图片

 

技术分享图片

技术分享图片

 

 

遍历循环保留字

原文:https://www.cnblogs.com/pengwa1226/p/10459281.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!