aboutsummaryrefslogtreecommitdiff
path: root/challenge-225/deadmarshal/python/ch1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-225/deadmarshal/python/ch1.py')
-rw-r--r--challenge-225/deadmarshal/python/ch1.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-225/deadmarshal/python/ch1.py b/challenge-225/deadmarshal/python/ch1.py
new file mode 100644
index 0000000000..113fe83ccb
--- /dev/null
+++ b/challenge-225/deadmarshal/python/ch1.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+def max_words(arr):
+ return max(map(lambda s: len(s.split(sep=' ')),arr))
+
+print(max_words(["Perl and Raku belong to the same family.",
+ "I love Perl.",
+ "The Perl and Raku Conference."]))
+print(max_words(["The Weekly Challenge.",
+ "Python is the most popular guest language.",
+ "Team PWC has over 300 members."]))
+