What about

~~~
>>> handlers = {'layout': 'check_layout', 'root': 'check_root'}
>>> for key in handlers:
...     print("key = {0}\nhandlers['{0}'] = {1}".format(key, handlers[key]))
...
key = root
handlers['root'] = check_root
key = layout
handlers['layout'] = check_layout
~~~