Xiang Zhang <angwe...@126.com> added the comment: It's just the right behavior. You are modifying the list while iterating over it. It has no business of underscore.
>>> test = ['_a', 'a', '_b', 'b'] >>> for i in test: test.remove(i) >>> test ['a', 'b'] ---------- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33157> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com