用AI赚第一桶💰低成本搭建一套AI赚钱工具,源码可二开。 广告
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') ```