How do you write a counter to a file in order?
<p>I need to write a counter to a file in order of most occurring to least occurring but I am having a little trouble.  When I print the counter it prints in order but when I call counter.items() and then write it to a file it writes them out of order.  </p>

<p>i am trying to make it like this:</p>

<pre><code>word      5
word2     4
word3     4
word4     3
</code></pre>

<p>...
thanks!</p>
