ARTICLE AD BOX
I expected this list comprehension to filter even numbers, but it returns an empty list:
numbers = [1, 2, 3, 4, 5, 6] result = [x for x in numbers if x % 2 == 0 and x > 10] print(result)I expected this list comprehension to filter even numbers, but it returns an empty list:
numbers = [1, 2, 3, 4, 5, 6] result = [x for x in numbers if x % 2 == 0 and x > 10] print(result)Hidden in mobile, Best for skyscrapers.