Skip to content

Commit

Permalink
Solution, added var for phrase
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard Habryd committed Jul 31, 2023
1 parent 78410ef commit 2ad18c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def count_occurrences(phrase: str, letter: str) -> int:
:return: count occurrences of letter in phrase
"""
character = letter.lower()
count = phrase.lower().count(character)
phrase_lower = phrase.lower()
count = phrase_lower.count(character)

return count

0 comments on commit 2ad18c4

Please sign in to comment.