title: Counting each DIFFERENT character in text file
body: <p>I'm relatively new to python and coding and I'm trying to write a code that counts the number of times each different character comes out in a text file while disregarding the case of the characters.</p>
  
  <p>What I have so far is</p>
  
  <pre><code>letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o',
         'p','q','r','s','t','u','v','w','x','y','z']
  
  prompt = "Enter filename: "
  
  titles = "char       count\n----       -----"
  
  itemfmt = "{0:5s}{1:10d}"
  
  totalfmt = "total{0:10d}"
  
  whiteSpace = {' ':'space', '\t':'tab', '\n':'nline', '\r':'crtn'}
  
  filename = input(prompt)
  
  fname = filename
  numberCharacters = 0
  fname = open(filename, 'r')
  
  for line in fname:
      linecount +=1
      word = line.split()
      word += words
  for word in words:
      for char in word:
          numberCharacters += 1
  return numberCharacters
  </code></pre>
  
  <p>Somethings seems wrong about this. Is there a more efficient way to do my desired task?</p>
  
  <p>Thanks!</p>