Using ternary operator in python?
<p>Consider the following code snippet. It flags a syntax error at the break statement.</p>

<pre><code>digits = list(str(102))
dummy = list(str(102/2))
for j in digits:
    dummy.remove(j) if j in dummy else break
</code></pre>

<p>How do I fix this?(I want to still use the ternary operator)</p>