python for if list comprehension code example
Example 1: list comprehension python if else
[statement if condition else statement for _ in iterable_object]
#statement are without assignment
Example 2: python list comprehension
nums = [3578, 6859, 35689, 268]
half_of_nums = [x/2 for x in nums]