WoodyWoo <saulmatchl...@163.com> added the comment:

#new code to avoid an err
index=0
count=len(root.findall("./*"))
while index <count:
    rank = int (root[index].find("rank").text)
    if rank>50:
        root.remove(root[index])
        index=index+0
        count=count-1  # avoid index err
        continue
    index=index+1

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41899>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to