News for hackers. Stuff that matters.
Re:Antirez' tiny JSON selector library by Mikhail_Edoshin on Tuesday November 28, 2023 @06:12AM (#38444575)
It is actually much simpler: you change 'n' as well:

    while i < n:
      if shouldDelete(iterable[i]):
        del iterable[i]; n -= 1
      else:
        i += 1

There are no comments on this comment yet.