Avoid dict change during iteration