Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-liner re-findall solution in Clear category for First Word by swagg010164
from re import findall
def first_word(text: str) -> str:
a = findall(r'([\w\'-]+)', text)
return a[0] if len(a) > 0 else ""
Dec. 8, 2019