#!/usr/bin/python3 # # This program reads a text file from the standard input, and prints # the list of all characters present in the input followed by the # number of times the character appears in the input. # import sys freq = {} for line in sys.stdin: for c in line: if c in freq: freq[c] = freq[c] + 1 else: freq[c] = 1 for c, f in freq.items(): print(c, f)