title: Sorting Dict throws an error - python
body: <p>I am learning python and trying to sort dicts in the simplest way and its throwing errors</p>
  
  <pre><code>d = {'a':10,'b':1,'c':22}
  print (d.items())
  
  t = d.items()
  t.sort()
  print (t)
  </code></pre>
  
  <p>And it throws me the below error</p>
  
  <pre><code>dict_items([('b', 1), ('a', 10), ('c', 22)])
  Traceback (most recent call last):
    File "/Users/bash/Downloads/n.py", line 5, in &lt;module&gt;
      t.sort()
  AttributeError: 'dict_items' object has no attribute 'sort'
  </code></pre>
  
  <p>Yes, I googled and stackoverflow did not give the results I am looking for so it would be great if you dont down vote this question and give an answer if possible.</p>