We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f65a064 commit 363ff3fCopy full SHA for 363ff3f
040_challenge_1_exercise.py
@@ -30,7 +30,23 @@
30
print("Function: report_long_words")
31
32
def report_long_words(words):
33
- pass
+ long_words_list = []
34
+
35
+ for word in words:
36
37
+ if len(word) >= 10 and "-" not in word:
38
+ if len(word) >= 15:
39
+ word = word[:15] + "..."
40
+ long_words_list.append(word)
41
42
+ if long_words_list:
43
+ return "These words are quite long: " + ", ".join(long_words_list)
44
+ else:
45
+ return "These words are quite long: "
46
47
48
49
50
51
check_that_these_are_equal(
52
report_long_words([
0 commit comments