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

关于数组的一个小问题请教一下

  •  
  •   gdw1986 · Nov 10, 2020 · 3020 views
    This topic created in 2191 days ago, the information mentioned may be changed or developed.
    最近在看算法哈,遇到个问题就是,比如一个数组我可能需要临时的去掉一个元素,下一个循环呢我可能要把它加回来,我现在能想到的办法就是用 deepcopy 到另外一个临时数组,请问各位大佬有别的好办法吗?
    6 replies  •  2020-12-07 18:50:35 +08:00
    helloworld000
    helloworld000
    Nov 10, 2020
    1
    哥们你这不是算法问题,是能否清楚的用中文进行表达的问题...
    maocat
    maocat
    Nov 10, 2020 via Android
    2
    if item=='xxx':
    continue
    gdw1986
    gdw1986
    OP
    Nov 10, 2020
    3
    @maocat 哦,直接跳过是个办法
    quanjw
    quanjw
    Nov 10, 2020
    4
    size 定义下数组长度
    akatquas
    akatquas
    Nov 10, 2020
    5
    filter
    shm7
    shm7
    Dec 7, 2020 via iPhone
    6
    @helloworld000 感觉都是“7 天精通 python 2 周深入深度学习” 最近好多问 print 怎么写这种问题的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   946 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:57 · PVG 03:57 · LAX 11:57 · JFK 14:57
    ♥ Do have faith in what you're doing.