if condition in Python's list comprehension is not working : <p>I have the following simple code in python giving <strong>SyntaxError: invalid syntax</strong></p>

<p>I want a new list with non zero values.</p>

<pre><code>data = [11,2,0,34,8,4]
new_data = [ if x for x in data  ]
print( new_data )
</code></pre>
