# searching easy

Shortest Word

The tiniest fairy can only carry the tiniest word. 🧚

You get a list of words (at least one). Print the word with the fewest letters. On a tie, the first one wins.

Example:

Input: words = ["dragon", "elf", "goblin", "orc"] Output: elf

Starting with best = "dragon" (6 letters), elf (3 letters) is shorter and becomes the new best β€” nothing later beats it.

πŸ’‘ need a hint?

srch-shortest-word.pyπŸ”’ given lines are locked β€” write your code in between
loading...