Skip to content

Commit

Permalink
'Solution'
Browse files Browse the repository at this point in the history
  • Loading branch information
Danylo-Ok committed Nov 23, 2024
1 parent ebf8027 commit f51d021
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

def count_occurrences(phrase: str, letter: str) -> int:
return phrase.lower().count()(letter.lower())
count = 0
for char in phrase:

if char.lower() == letter.lower():
count += 1
return count

0 comments on commit f51d021

Please sign in to comment.