2278. Percentage of Letter in String

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

Содержание

LeetCode problem 2278

class Solution:
    def percentageLetter(self, s: str, letter: str) -> int:
        return s.count(letter) * 100 // len(s)