标签:结束 bre UI pycharm 也会 proc 表达式 == continue
#!/usr/bin/env python sum100 = 0 counter = 1 while counter <= 100: sum100 += counter counter += 1 print "result is %d" % sum100
#!/usr/bin/env python while True: yn = raw_input("continue?(y/n)") if yn in ‘Yy‘: break print "work on" /usr/bin/python2.6 /root/PycharmProjects/untitled10/break1.py continue?(y/n)n work on continue?(y/n)y Process finished with exit code 0
#!/usr/bin/env python sum100 = 0 counter = 1 while counter <= 100: counter += 1 if counter % 2 == 1: continue sum100 += counter print sum100
#!/usr/bin/env python sum10 = 0 i = 1 while i <= 10: sum10 += i i += 1 else: print sum10
标签:结束 bre UI pycharm 也会 proc 表达式 == continue
原文地址:http://www.cnblogs.com/weiwenbo/p/6553052.html