多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
1、while() ``` age = raw_input("please give me your age in years (eg.30):") while not age.isdigit(): print "I'm sorry,but {} isn't valid.".format(age) age = raw_input("please give me your age in years (eg.30):") print "thanks! your age is set to {} ".format(age) ``` 2、无限循环![] ``` while True: text = raw_input("give me some text,and I'll count the e's.Enter 'q' to quit: ") if text == 'q': break print text.count('e') ```