# Solution for the letter frequency problem # # Marco Della Vedova - marco.dellavedova@unicatt.it import sys # Initialization of the dictionary with the counts counts = {} for line in sys.stdin: for letter in line.lower(): if letter.isalpha(): # <- consider alphabetic character only if letter not in counts: counts[letter] = 0 counts[letter] += 1 print(counts)