title: (Python) How to count the number of letters in a word?
body: <p>I'm trying to create a program where if you input a word, it will print out each letter of the word and how many times the letter appears in that word.</p>
  
  <p>Eg; when I input "aaaarggh", the output should be "a 4 r 1 g 2 h 1".</p>
  
  <pre><code>def compressed (word):
      count = 0
      index = 0
      while index &lt; len(word):
          letter = word[index]
          for letter in word:
              index = index + 1
              count = count + 1
              print(letter, count)
          break
  
  print("Enter a word:")
  word = input()
  compressed(word)
  </code></pre>
  
  <p>So far it just prints out each letter and position in the word. 
  Any help appreciated, thank you!</p>
  
  <p>(no using dict method)</p>