from itertools import compress
x = [1, 2, 3, 4]
y = compress(x, map(lambda i: i & 1, x))
print(*y)
Post #1139
2.51K
Что выведет код?
PY Python Tasks & ML | Задачи по питону и машинному обучению @python_tasks · 8.49K subscribers from itertools import compress
x = [1, 2, 3, 4]
y = compress(x, map(lambda i: i & 1, x))
print(*y)