Dictionary infinite loop is exiting unexpectedly
There is no guarantee that you will iterate over all your dict entries if you mutate it in your loop. From the docs: Iterating views while adding or deleting entries in the dictionary may raise a RuntimeError or fail to iterate over all entries. You could create an “enumerated” infinite loop similar to your initial … Read more