推荐学习书目
› 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
jasya
V2EX  ›  Python

关于字符串与数字比较的问题

  •  
  •   jasya · May 11, 2011 · 8735 views
    This topic created in 5615 days ago, the information mentioned may be changed or developed.
    昨天看MIT的公开课.第二课的时候

    出现了,字符串与数字对比的问题.----------有学生提问.python内部是不是进行了ascii比较

    老师肯定的回答是

    如果照这个老师说的那么

    >>> 11111<'a'
    True

    应该为False

    想问下大家字符串与数字比较的时候.到底采用的是什么转换机制?
    1 replies  •  1970-01-01 08:00:00 +08:00
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2520 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:21 · PVG 08:21 · LAX 17:21 · JFK 20:21
    ♥ Do have faith in what you're doing.