human
How can I convert a Python dictionary to a list of tuples?
assistant
Here is some code to convert python 2 dictionary `a` to a list of tuples where the value is the first tuple element and the key is the second tuple element

[(v, k) for k, v in a.items()]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.