LovePinkLol-Python Programming
Saturday, November 4, 2017
434. Number of Segments in a String
class Solution:
def countSegments(self, s):
"""
:type s: str
:rtype: int
"""
new_list = []
new_list = s.split()
return len(new_list)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment