nested if in list comprehension python