getting data out of a txt file
<p>I'm only just beginning my journey into Python. I want to build a little program that will calculate shim sizes for when I do the valve clearances on my motorbike. I will have a file that will have the target clearances, and I will query the user to enter the current shim sizes, and the current clearances. The program will then spit out the target shim size. Looks simple enough, I have built a spread-sheet that does it, but I want to learn python, and this seems like a simple enough project...</p>

<p>Anyway, so far I have this:</p>

<pre><code>def print_target_exhaust(f):
    print f.read()

#current_file = open("clearances.txt")
print print_target_exhaust(open("clearances.txt"))
</code></pre>

<p>Now, I've got it reading the whole file, but how do I make it ONLY get the value on, for example, line 4. I've tried <code>print f.readline(4)</code> in the function, but that seems to just spit out the first four characters... What am I doing wrong?</p>

<p>I'm brand new, please be easy on me!
-d</p>
