title: python - find the occurrence of the word in a file
body: <p>I am trying to find the count of words that occured in a file. I have a text file (<code>TEST.txt</code>) the content of the file is as follows: </p>
  
  <pre><code>ashwin programmer india
  amith programmer india
  </code></pre>
  
  <p>The result I expect is:</p>
  
  <pre><code>{ 'ashwin':1, 'programmer ':2,'india':2, 'amith ':1}
  </code></pre>
  
  <p>The code I am using is:</p>
  
  <pre><code>for line in open(TEST.txt,'r'):
      word = Counter(line.split())
      print word
  </code></pre>
  
  <p>The result I get is:</p>
  
  <pre><code>Counter({'ashwin': 1, 'programmer': 1,'india':1})
  Counter({'amith': 1, 'programmer': 1,'india':1})
  </code></pre>
  
  <p>Can any one please help me? Thanks in advance      .</p>