diff --git a/.flake8 b/.flake8 index d7459204..3f5e06ff 100644 --- a/.flake8 +++ b/.flake8 @@ -4,4 +4,4 @@ ignore = E203, E266, W503, ANN002, ANN003, ANN101, ANN102, ANN401, N807, N818 max-line-length = 79 max-complexity = 18 select = B,C,E,F,W,T4,B9,ANN,Q0,N8,VNE -exclude = venv, tests +exclude = venv, tests, .venv diff --git a/app/main.py b/app/main.py index 4ccbb02b..559c582f 100644 --- a/app/main.py +++ b/app/main.py @@ -14,4 +14,4 @@ def count_occurrences(phrase: str, letter: str) -> int: :param letter: letter to find occurrences of it :return: count occurrences of letter in phrase """ - # write your code here + return sum(1 for char in phrase if char.lower() == letter.lower())