I have been trying, it returns a correct word for the first test:
def first_word(text: str) -> str:
first_word = ""
for word in text.split():
if word[0].isalpha():
first_word = word
break
return first_word.strip()
Can any one suggest a better approach?
Created at: 2023/07/26 16:03; Updated at: 2023/07/27 10:03
The question is resolved.