[Python] python循环中使用break语句终止循环 →→→→→进入此内容的聊天室

来自 , 2020-10-14, 写在 Python, 查看 147 次.
URL http://www.code666.cn/view/717729ce
  1. #!/usr/bin/python
  2. # Filename: break.py
  3.  
  4. while True:
  5.     s = raw_input('Enter something : ')
  6.     if s == 'quit':
  7.         break
  8.     print 'Length of the string is', len(s)
  9. print 'Done'
  10.  
  11.  
  12.  

回复 "python循环中使用break语句终止循环"

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

captcha