Why doesn't this set comprehension work?
<p>In Python 2.6.5, given this list
    mylist = [20, 30, 25, 20]</p>

<p>Why does this set comprehension not work?</p>

<pre><code>&gt;&gt;&gt; {x for x in mylist if mylist.count(x) &gt;= 2}
  File "&lt;stdin&gt;", line 1
    {x for x in mylist if mylist.count(x) &gt;= 2}
         ^
SyntaxError: invalid syntax
</code></pre>

<p>Thank you.</p>
