Skip to content

Commit

Permalink
Fix solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Codoeh committed Oct 13, 2024
1 parent a33b45c commit acbc41f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ def count_occurrences(phrase: str, letter: str) -> int:
"""

phrase_lower = phrase.lower()
counter = 0

for character in phrase_lower:
if character == letter.lower():
counter += 1
letter_lower = letter.lower()
counter = str.count(phrase_lower, letter_lower)

return counter

0 comments on commit acbc41f

Please sign in to comment.