class Solution:

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

a6c9601e6ee2b71b4510d13195bd6435389c8679
<mask token>

class Solution:
    <mask token>

class Solution:

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