python inline list comprehension code example
Example 1: list comprehension python 3
number_list = [x for x in range(10) if x % 2 == 0]
print(number_list)
Example 2: list comprehension python one line
doubled_odds = [n * 2 for n in numbers if n % 2 == 1]