title: modifying a dictionary while iterating over it
body: <p>I'd like to be able to go over a dictionary, calling a function for each entry, while this function might add more entries to the same dictionary. Is it possible to have some sort of iterating method that will allow me to do this AND have the function iterate over the newly added entries at the same for loop?
  in example:
  I have <code>dict = {"A": 1, "B": 2, "C": 3}</code>
  I want to iterate over it with function f. 
  Even if calling <code>f(dict["A"])</code> puts a new entry in the dictionary, making it:
  <code>{"A": 1, "B":2, "C": 3, "new key": "new value"}</code>, I want the loop to also call <code>f(dict["new key"])</code> at the same iteration.</p>