title: How to remove characters from list
body: <p>I have a file with a few words in it, each on a different line. I want to take the first 2 characters on each word and see how many times each combo shows up. </p>
  
  <p>I am at the initial stages and would like some help.The output is this:</p>
  
  <pre><code>Enter path to filename :stems.txt
  
  ['test\ntester\njest\ncompute\ncomputer\nliterate\nliteral\nliteracy\ncontinue\ncollaborate\n']
  
  test
  tester
  jest
  compute
  computer
  literate
  literal
  literacy
  continue
  collaborate
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>file = raw_input("Enter path to filename :")
  
  text_file= open(file,'r')
  data=text_file.read()
  
  
  def first2():
      lines = []
      lines.append(data)
      print lines
  
      letters = []
      for x in lines:
          firstletter = x[:2]     
          return firstletter
  
  print first2()
  </code></pre>
  
  <p>I am wondering why the return firstletter returns all the words and not the first two letters of each word ? </p>