class Solution(object):
    def lengthOfLastWord(self, s):
        """
        :type s: str
        :rtype: int
        """
        return len(s.split()[-1])

s="hello world"
print(Solution().lengthOfLastWord(s))
