[LeetCode] 58. Length of Last Word
Python
class Solution:
def lengthOfLastWord(self, s: str) -> int:
temps = s.split()
return len(temps[-1])
class Solution:
def lengthOfLastWord(self, s: str) -> int:
temps = s.split()
return len(temps[-1])
댓글남기기