Приведи примеры ____
public static void main(String[] args) {
List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
List<Integer> evenNumbers = new ArrayList<>();
numbers.stream()
.filter(num -> num % 2 == 0)
.forEach(evenNumbers::add);
}
def even_numbers():
yield from [x for x in range(1, 6) if x % 2 == 0]
print(list(even_numbers()))