Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
We analize every char solution in Clear category for First Word by ari10000krat
def first_word(text: str) -> str:
"""
returns the first word in a given text.
"""
result = ''
status = False # Status: WE FIND THE WORD!
for char in text:
if char.isalpha() or char == "'":
status = True
result += char
elif status:
return result
return result
Jan. 18, 2021
Comments: