title: Python print dictionary in order
body: <p>Hello i want to print this dictionary in order but i dont know how:</p>
  
  <pre><code>s = input("")
  slist = s.split()
  finaldict = {}
  for word in slist:
      if not finaldict.get(word):
          finaldict[word] = slist.count(word)
  
  for palabra in finaldict:
      finaldict[palabra]=str(finaldict[palabra])
      print(palabra,finaldict[palabra])
  </code></pre>
  
  <p>input : <code>this is a test a test a test</code>
  expected output: </p>
  
  <pre><code>this 1
  is 1
  a 3
  test 3
  </code></pre>
  
  <p>i want that order but i get random order prints</p>
  
  <p>Thanks!</p>