← back to unit
Easy
# searching easy
The First Long Word
The crossword needs a nice long word. ✏️
You get a list of words and a number n. Print the first word with MORE than n letters, or none if every word is short.
Example:
Input: words = ["cat", "horse", "elephant", "bee"], n = 4
Output: horse
cat has 3 letters (not more than 4), but horse has 5 letters — that's the first word longer than n, so we print it.
💡 need a hint?
srch-first-long-word.py🔒 given lines are locked — write your code in between
loading...