Note that the approach in SilentGhost's answer does not guarantee the order of each tuple, since dictionaries and their values() do not have a built-in order. So you can just get ('Foo', 1) as (1, 'Foo') , in the general case.
If this is unacceptable and you definitely need an id , you will have to do this explicitly:
[(d['id'], d['name']) for d in l]
source share