python:
from random import randint
lst = [randint(-5, 5) for _ in range(10)]
print(sum(filter(lambda x: not x % 2, lst)))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
python:
from random import randint
lst = [randint(-5, 5) for _ in range(10)]
print(sum(filter(lambda x: not x % 2, lst)))