Question: I have a dict of following format:

```
 d[1][2]= 0.3
 d[1][3] = 0.4
 d[2][8] = 0.2
 d[id1][id2] = value

```

I want to reverse sort this by value?

My logic is very verbose and I have a feeling that it can be done very quickly in python?

Answer: 
You can do so by hitting Cntrl+F and then checking regular expression box.And put what you want to replace with what thing. You can put regular expression to find as

```
    \r 

```

and replace it with

```
        "YOUR TEXT"\r

```

![enter image description here](https://i.stack.imgur.com/n6H3k.png)
Get a good text editor like [Notepad++](http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CC4QFjAA&url=http://notepad-plus-plus.org/&ei=CyLGUJTyO83wrQef34CQDw&usg=AFQjCNH20Y39KL3umNlz40yN398ALm0wKg), then use the Find/Replace box. Select Regular Expression radio button in the Search Mode section. Search for `$` (which is the end of line token), and replace with whatever text you'd like.