ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
1、break() ``` cart = [20.25,30.04,102.4,50,80] for item in cart: print item if item > 100: print "you are going to require insurance on this order." break ``` 2、for 和else![] ``` cart = [20.25,30.00,99.99,1.24] for item in cart: print item if item > 100: print "you are going to require insurace on this order" break else: print "no insurance will be required for this order" ```