Read file into dictionary and manipulate data
<p>I am trying to read a text file and delete certain lines from it, if some values exceed an amount that i choose.</p>

<p>It's a text file that holds a map and I need to manipulate the values in the 3rd column. And then write the new map into a different file (or edit the same file). Note that those values are 3-4 characters long.</p>

<p>This is how the map looks like (relevant values in bold type)</p>

<blockquote>
  <p>1 979 <strong>999</strong> 514 383 117 95 1</p>
  
  <p>1 979 <strong>1000</strong> 514 383 117 95 1</p>
</blockquote>

<p>I managed to write a clean short code for reading from files. This is what i have so far:</p>

<pre><code>List = []
for line in open('textFile.txt','r').readlines():
    List.append(line.strip())
    print(line)
</code></pre>

<p>Now i need a way to identify the relevant values on each line and set a condition that will hold the manipulation (deleting values in this case). </p>

<p>I've tried to compare a certain range in a specific line as an array to an integer but that did not work. </p>

<p>I also tried placing it all in one string and setting an exponential loop that will delete every characters that reside in the [6] to [10] range (growing exponentially) but that turned out to be too complicated for me.</p>

<p>Could anyone help me with this?</p>
