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

请问这是 Python 的什么用法

  •  
  •   Pangolin1984 · Mar 6, 2020 · 2994 views
    This topic created in 2434 days ago, the information mentioned may be changed or developed.
    >>> ('a','b')[0]
    'a'

    >>> ('a','b')[1]
    'b'

    >>>
    10 replies  •  2020-04-06 21:19:57 +08:00
    Pangolin1984
    Pangolin1984
    OP
    Mar 6, 2020
    2
    @yangyaofei 闲的吧你,还加一条推广链接
    also24
    also24
    Mar 6, 2020
    3
    刚想认真回答,看到 2 楼……
    EileenJ
    EileenJ
    Mar 6, 2020 via Android
    4
    没记错的话,小括号是元组
    xiaowei0823
    xiaowei0823
    Mar 6, 2020
    5
    这应该算是普通用法
    CEBBCAT
    CEBBCAT
    Mar 6, 2020 via Android
    6
    通过下标取元组元素,有什么奇怪之处呢?
    CEBBCAT
    CEBBCAT
    Mar 6, 2020 via Android
    7
    五年前的账号,三年前就接触 Python,今天问了这样没头没脑的问题……关键是楼主也有放狗的意识,陷入迷思……
    yangyaofei
    yangyaofei
    Mar 6, 2020 via Android
    8
    @also24 我觉得我的回答和他的回复挺配的,和他的提问一个味儿😎
    ShawnSky
    ShawnSky
    Mar 12, 2020
    9
    很寻常的用法
    linvaux
    linvaux
    Apr 6, 2020
    10
    这个问题是认真的吗???
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5181 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 01:20 · PVG 09:20 · LAX 17:20 · JFK 20:20
    ♥ Do have faith in what you're doing.