singularity

58. Length of Last Word

class Solution:
    def lengthOfLastWord(self, s: str) -> int:
        split = s.split()
        if len(split):
            lastWord = split[len(split)-1]
            return len(lastWord)
        else: 
            return 0