Length of Last Word
Return the number of letters in the last word of s. A word is a run of characters that are not spaces, and s may end with spaces.
Example 1
s "Hello World"
returns 5
The last word is World, which has 5 letters.
Example 2
s " fly me "
returns 2
Constraints
1 <= len(s) <= 100shas letters and spaces and at least one word
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.