I know this is possible with list comprehension but I can\'t seem to figure it out. Currently I have a list of dictionaries like so:
[ {\'field1\': \'a\', \'fie
You can try:
[[x['field2'], x['field1']] for x in l]
where l is your input list. The result for your data would be:
l
[['b', 'a'], ['d', 'c'], ['f', 'e']]
This way you ensure that the value for field2 comes before the value for field1
field2
field1