Source Code:
(back to article)
numbers = [1, 2, 3, 4, 5, 6] even_numbers = [x for x in numbers if x % 2 == 0] print(even_numbers)
Result:
Report an issue