Python Sort Collections.DefaultDict in Descending order
<p>I have this bit of code:</p>

<pre><code>    visits = defaultdict(int)
    for t in tweetsSQL:
         visits[t.user.from_user] += 1
</code></pre>

<p>I looked at some examples online that used the sorted method like so:</p>

<p><code>sorted(visits.iteritems, key=operator.itemgetter(1), reverse=True)</code></p>

<p>but it is giving me:</p>

<p><code>"TypeError: 'builtin_function_or_method' object is not iterable"</code></p>

<p>I am not sure why.</p>
