python inline list creation code example Example: list comprehension python 3 number_list = [x for x in range(10) if x % 2 == 0] print(number_list)