title: Python :sort list of dictionaries based on key
body: <p>I have a list of dictionaries</p>
  
  <pre><code>[{'abc':1},{'abcd':2},{'ab':1}]
  </code></pre>
  
  <p>Based on length of key list has to sorted</p>
  
  <pre><code>[{'abcd':2},{'abc':1},{'ab':1}]
  </code></pre>