Looping through all keys. Issue with input function, fix using ipython > 1.0.