If in for-loop not working even though the condition is satisfied
<p>Running the following code to compare values in a column of a text file to a given number, in this case 440</p>

<pre><code>with open('test.txt', 'a+') as input:
 for line in input:
  columns = line.split(" ")
  print columns[5] #test
  if columns[5] == '440':
   print 'match'
</code></pre>

<p>test.txt is just:</p>

<pre><code>0 0 0 0 0 1
0 0 0 0 0 440
0 0 0 0 0 1   
0 0 0 0 0 440
0 0 0 0 0 1
0 0 0 0 0 1
</code></pre>

<p>The print columns[5] bit prints out the right value from the txt file, but even when it matches 440, the if inside the for-loop doesnt work</p>

<p>thank you for any help</p>
