How to sort a Python dict by value
<p>I have a dict that looks like this</p>

<p><code>{ "keyword1":3 , "keyword2":1 , "keyword3":5 , "keyword4":2 }</code></p>

<p>And I would like to convert it DESC and create a list of just the keywords. Eg, this would return</p>

<p><code>["keyword3" , "keyword1" , "keyword4" , "keyword2"]</code></p>

<p>All examples I found use lambda and I'm not very strong with that. Is there a way I could loop through this, and sort them as I go? Thanks for any suggestions.</p>

<p>PS: I could create the initial dict differently if it would help.</p>
