Python: Syntax error in list comprehension statement
<pre><code>missing_buckets = [x in timebuckets if ((x not in found_tenors) and (x == '1y' or x[-1] != 'y'))]
</code></pre>

<p>I get the error:</p>

<pre><code>missing_buckets = [x in timebuckets if ((x not in found_tenors) and (x == '1y' or x[-1] != 'y'))]
                                                                                                ^
SyntaxError: invalid syntax
</code></pre>
