@@ -0,0 +1,704 @@
+#!/usr/bin/env python3.5%0A%0Aimport sys%0Aimport re%0A%0Adef process(file):%0A  charFirstLine = %7B%7D%0A  chardict = %7B%7D%0A  f = open(file, 'r', encoding='utf8')%0A  lineno = 0%0A  for line in f:%0A    lineno += 1%0A    for c in list(line):%0A      v = chardict.get(ord(c))%0A      if v:%0A        chardict%5Bord(c)%5D = v + 1%0A      else:%0A        chardict%5Bord(c)%5D = 1%0A        charFirstLine%5Bord(c)%5D = lineno%0A  f.close()%0A  return chardict, charFirstLine%0A%0Aif __name__ == '__main__':%0A  args = sys.argv%5B1:%5D%0A  if (len(args) == 1):%0A    filename = args%5B0%5D%0A    chardict, charFirstLine = process(filename)%0A    for key in sorted(chardict.keys()):%0A      print(%22%25s%5Ct(%25d)%5Ct%25d%5CtFirst line: %25d%22 %25 (chr(key), key, chardict.get(key), charFirstLine.get(key)))%0A

Create charCount.py