Runtime: 52 ms, faster than 29.03% of Python3 online submissions for Length of Last Word.
class Solution:
def lengthOfLastWord(self, s):
"""
:type s: str
:rtype: int
"""
return len(s.rstrip().split(' ')[-1])