[Python] python循环中使用continue语句代码片段 →→→→→进入此内容的聊天室

来自 , 2020-02-23, 写在 Python, 查看 96 次.
URL http://www.code666.cn/view/8ab9bb97
  1. #!/usr/bin/python
  2. # Filename: continue.py
  3.  
  4. while True:
  5.     s = raw_input('Enter something : ')
  6.     if s == 'quit':
  7.         break
  8.     if len(s) < 3:
  9.         continue
  10.     print 'Input is of sufficient length'
  11.     # Do other kinds of processing here...
  12.  
  13.  
  14.  
  15.  
  16. #//python/4462

回复 "python循环中使用continue语句代码片段"

这儿你可以回复上面这条便签

captcha