reordering list of dicts arbitrarily in python,"ordered = sorted(lst, key=lambda d: [2, 3, 1, 4].index(int(d['id'])))"