2114. Maximum Number of Words Found in Sentences

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2114

class Solution:
    def mostWordsFound(self, sentences: List[str]) -> int:
        return 1 + max(s.count(' ') for s in sentences)