Question: I want make a specific element of each dictionary the first element in a list of dictionaries. How would I do this, or is it even possible given that dictionaries are unordered?

I don't want to use .sort() by itself or OrderedDict because both will not bring the desired element to the top of the keys as the keys are alphabetically ordered. Is there a way to use the lamba keyword in combination with sort in Python 2.7 to do this?

Ex:

I want `b` to be the first key 

```
{'a': 1, 'b': 2, 'c': 3}

{'b': 2, 'a': 1, 'c': 3}

```

---

CONTEXT:

I have a large set of dictionaries where each dictionary represents a bunch of info about a job. Each dictionary has a code that identifies the job. My superior would like to have this code moved to the top of its dictionary.

Answer: 
Dicts don't have any top or bottom. You can try something like this:

```
>>> from itertools import chain
>>> dic = {'a': 1, 'b': 2, 'c': 3}
>>> key = 'b'
for k in chain(key, (dic.viewkeys()-key)):
    print k, dic[k]
...     
b 2
a 1
c 3

```

Better use an `OrderedDict`.

```
>>> from collections import OrderedDict
>>> key = 'b'
>>> dic1 = OrderedDict((k,dic[k]) for k in chain(key, (dic.viewkeys()-key)))
>>> next(iter(dic1))
'b'

```
> 
> is it even possible given that dictionaries are unordered?
> 
> 
> 

No, it's not possible. Any solution you find that seems to do the trick will not be guaranteed to work between python versions, builds, code contexts, etc. If you want an ordered data type, you'll need something other than a dictionary.