Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple and clear solution in Clear category for First Word by Tinus_Trotyl
def first_word(text: str) -> str:
i = j = 0
while text[i: i+1] in " ,.": i = j = i + 1
while text[j: j+1] not in " ,.": j = j + 1
return text[i: j]
Aug. 26, 2018
Comments: