I don't think this is valid syntax: the ```if``` and the ```for``` clauses should be swapped:
```python
>>> [x if x % 2 == 0 for x in range(10)]
  File "<stdin>", line 1
    [x if x % 2 == 0 for x in range(10)]
                       ^
SyntaxError: invalid syntax
>>> [x for x in range(10) if x % 2 == 0]
[0, 2, 4, 6, 8]
>>> 
```