Like in [a if condition1 else b for i in list1 if condition2], the two ifs with condition1 and condition2 doing two different things. The part (a if condition1 else b) is from a lambda expression:
lambda x: a if condition1 else b
while the other condition2 is another lambda:
lambda x: condition2
Whole list comprehension can be regard as combination of map and filter:
map(lambda x: a if condition1 else b, filter(lambda x: condition2, list1))