V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
cidao
V2EX  ›  Python

python 循环问题 一个程序循环输入

  •  
  •   cidao · Dec 29, 2015 · 3500 views
    This topic created in 3777 days ago, the information mentioned may be changed or developed.
    怎么让它输入11位数字的时候停止运行 不是11位数字的时候继续输入http://static.wooyun.org/upload/image/201512/2015122900495621321.png
    2 replies    2015-12-29 01:51:37 +08:00
    monkeylyf
        1
    monkeylyf  
       Dec 29, 2015
    while s and s.isdigit() and len(s) == 11:
    monkeylyf
        2
    monkeylyf  
       Dec 29, 2015
    不是太理解 raw_input 为什么不在 while 的 body 里面
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   997 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:15 · PVG 02:15 · LAX 11:15 · JFK 14:15
    ♥ Do have faith in what you're doing.