Files
Functional/src/functional/04_K_Länge.py
T
2026-11-12 12:05:01 +01:00

7 lines
182 B
Python

from functools import reduce
words = ["Apfel", "Banane", "Kirsche", "Kiwi", "Melone"]
result = sum(map(lambda x : len(x) , filter(lambda x : x[0][0] == "K", words)))
print(result)