1935. Maximum Number of Words You Can Type

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

Содержание

LeetCode problem 1935

class Solution:
    def canBeTypedWords(self, text: str, brokenLetters: str) -> int:
        s = set(brokenLetters)
        return sum(all(c not in s for c in w) for w in text.split())