how to use IF condition in list comprehension