Skip to content

Commit

Permalink
Update 58_Length_of_Last_Word.py
Browse files Browse the repository at this point in the history
  • Loading branch information
celestaria authored Aug 8, 2023
1 parent 92d8812 commit 0fba4ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 58_Length_of_Last_Word.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Solution:
def lengthOfLastWord(self, s: str) -> int:
s = s.rstrip()
return len(s.split()[-1])
y = s.rstrip()
return len(y.split()[-1])

0 comments on commit 0fba4ac

Please sign in to comment.