In your case you were conditionally choosing a manipulated return value for x and didn't care at all about filtering the list. Here's one with both:
[x if x > y else x*2 for x in a if x % 2 == 0]
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
return x as... filter down to only...
x or x*2 even 'x's
There's not really a semantically logical place for an "else" in the latter half because it's only looking for a true statement so it can return x (or not).For example this makes sense:
... if x % 2 == 0 or x == 3
(filter the list to even values of x or the value 3)but this does not:
... if x % 2 == 0 else x == 3
(filter the list to even values, otherwise wait, otherwise?)