This is my solution resulting in an error. Returns 0
PS: I\'d still love a fix to my code :)
from collections import Counter import
def count_letter(string): count = 0 for i in range(len(string)): if string[i].isalpha(): count += 1 return count print(count_letter('The grey old fox is an idiot.'))