I need to parse some text and integers from a file
<p>I'm having trouble with a problem I'm trying to do. My goal is to import a file that contains football teams names, and then the number of wins and losses, and then if a team's average is greater than .500, than I have to write that teams name, and average to a new file. And then I have to write the teams under .500 to a seperate file. so far I have my code so that it reads eachline of the file, but I can't figure out how to analyize each line of code. I'm really just looking for any advice I could get at this point, and it would be greatly appreciated.</p>

<pre><code>scores = open("fbscores.txt",'r')
eachline = scores.readline()
while eachline != "":
    print(eachline)
    eachline = scores.readline()
scores.close()
</code></pre>

<p>You are most likely going to end up using the split method, which breaks a string apart into a list element each time it encounters a certain character.  Read more here <a href="http://www.pythonforbeginners.com/dictionary/python-split" rel="nofollow">http://www.pythonforbeginners.com/dictionary/python-split</a>. </p>

python