Question: I have a Python dictionary, like so:

```
{0: 'Initialised', 1: 'Processed', 3:'Finished'}

```

I have a second Dictionary, like so:

```
{0: 81, 1: 100, 3: 906}

```

What I want is to get:

```
{'Initialised':81, 'Processed':100, 'Finished': 906}

```

What is the most efficient way to do this?

Answer: 
Do something like this

```
In [31]: t1 = {0: 'Initialised', 1: 'Processed', 3:'Finished'}
In [33]: t2 = {0: 81, 1: 100, 3: 906}

In [34]: {t1[key]: t2[key] for key in t1}
Out[34]: {'Finished': 906, 'Initialised': 81, 'Processed': 100}

```

Without Dictionary Comprehension:

```
t3 = {}
for key in t1:
    t3[t1[key]] = t2[key]

```
Isn't it very simple ?

Example using dictionary comprehension (which is available from Python 2.7 onwards) -

```
>>> d1 = {0: 'Initialised', 1: 'Processed', 3:'Finished'}
>>> d2 = {0: 81, 1: 100, 3: 906}
>>>
>>> d = {d1[k]:d2[k] for k in d1.keys()}
>>> d
{'Finished': 906, 'Processed': 100, 'Initialised': 81}

```