title: insertion sort with dictionary
body: <pre><code>stock={'meat':100,'fish':50,'bread':70, 'milk':35,'chips':15, 'apple':10,'orange':10, 'rice':10,'honey':10,'lemon':10}
  
  def insertionSort( theSeq ):
      n = len( theSeq )
  
      for i in range(1, n):
         key = theSeq[i]
         pos = i
         while pos &gt; 0 and key &lt; theSeq[pos - 1]:
             theSeq[pos] = theSeq[pos-1]
             pos -= 1
  
      theSeq[pos] = key
  
  
  print('Input List:', stock)
  insertionSort(stock)
  print('Sorted List:', stock)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/CJZQO.png" alt="this is my output after i run my codes"></p>
  
  <p>these are my codes and i have been trying to sort my dictionary using insertion sort but i keep running into this error and have no idea what to.</p>
  
  <p>i would like my output to be a list of unsorted dictionary followed by a list of the sorted dictionary</p>
  
  <p>i would appreciate any help i can get
  thank you in advance</p>