class Solution(object):
    def lengthOfLastWord(self, s):
        count = 0
        final = 0
        if s == "":
            return 0
        for x in s:
            if x.isalpha():
                count = count + 1
                final = count
            else:
                count = 0
        return final
8e708946abb954f8a3ba0e7b1d836c20a45872b2
<mask token>

class Solution(object):
    <mask token>

class Solution(object):

    def lengthOfLastWord(self, s):
        count = 0
        final = 0
        if s == '':
            return 0
        for x in s:
            if x.isalpha():
                count = count + 1
                final = count
            else:
                count = 0
        return final

class Solution(object):
    def lengthOfLastWord(self, s):
        count = 0
        final = 0
        if s == "":
            return 0
        for x in s:
            if x.isalpha():
                count = count + 1
                final = count
            else:
                count = 0
        return final