Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for First Word by madsndp
import re
def first_word(text: str) -> str:
"""
returns the first word in a given text.
"""
return re.findall(r"[\w']+", text)[0]
Aug. 16, 2018