Find the longest word in a given string, ignoring punctuation and ties by earliest occurrence.
Constraints
Example
[">>> longest_word('Hello world!')\n'Hello'", ">>> longest_word('The quick brown fox')\n'quick'", ">>> longest_word('a bb ccc')\n'ccc'", ">>> longest_word('123 456')\n''"]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints