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

Python 的 While 循环语句是从数组的最后一个开始判断的?

  •  
  •   anoyafk · Feb 9, 2017 · 5079 views
    This topic created in 3519 days ago, the information mentioned may be changed or developed.

    自学 Python,看到这张 GIF 图,感到疑惑.
    麻烦指教.
    loop-over-python-list-animation

    6 replies  •  2017-02-10 11:06:26 +08:00
    holajamc
        1
    holajamc  
       Feb 9, 2017
    pop()默认移除列表中的最后一个元素,并且返回该元素的值
    anoyafk
        2
    anoyafk  
    OP
       Feb 9, 2017
    @holajamc 是第五行的.pop()吗?
    thanks,我去查一下.
    WKPlus
        3
    WKPlus  
       Feb 9, 2017
    最后一个元素判断语句的动画是不是错了,应该是 even.append ,怎么动画里面变成了 odd.append 。
    竟然看到了最后一步,还以为眼花了,又看了一遍。
    fengxueshangu
        4
    fengxueshangu  
       Feb 9, 2017
    @WKPlus 确实错了吧
    kingphar
        5
    kingphar  
       Feb 9, 2017
    这个动画怎么做出来的?
    yanchao7511461
        6
    yanchao7511461  
       Feb 10, 2017
    我也想问,这个动画怎么做出来的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2887 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 11:17 · PVG 19:17 · LAX 04:17 · JFK 07:17
    ♥ Do have faith in what you're doing.