Leetcode 434. Number of Segments in a String

class Solution(object):
    def countSegments(self, s):
        """
        :type s: str
        :rtype: int
        """
        return len(s.split())
原文地址:https://www.cnblogs.com/zywscq/p/10569276.html