[BangPypers] Python dictionaries, deleting elements while iterating.

Pranjal Mittal pranjal.mittal.ece10 at iitbhu.ac.in
Mon Feb 25 16:21:58 CET 2013

Hi all,

I was writing a piece of code that deletes items from Python Dictionaries
when a certain condition is met. while iterating over the dictionary.


However that leads to a RunTime Error.
Though I figured out an alternate solution, I still wonder why shouldn't
something like *Case-1 *(in the code) work ideally.

- Pranjal Mittal

B.Tech. Part III,
Indian Institute of Technology, BHU,
Varanasi -221005

More information about the BangPypers mailing list