Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for First Word (simplified) by chandyk
def first_word(text: str) -> str:
"""
returns the first word in a given text.
"""
return text.split()[0]
if __name__ == '__main__':
print("Example:")
print(first_word("Hello world"))
June 11, 2019