import sys t=sys.stdin.read() c=[] a=[x for x in range(65,123) if x not in [y for y in range(91,97)]] for x in a: \x09k=t.count(chr(x)) \x09c.append(k) \x09print "%s: %s"%(chr(x),k) if len(str(k))==2 else "%s: %s"%(chr(x),k) \x09\x09
Note that non-ascii characters in the above source code will be escaped (such as \x9f).