Well,<br>
 I was somewhat confused with all of the answers so I decided to go
with&nbsp; my/following method.&nbsp; Kent&#39;s method has 4 fewer lines of
code than mine and cleaner.&nbsp; Please correct me if I am fundamentally wrong. <br>
<br>
f=open(&#39;file.txt&#39;,r)<br>
<br>
for line in f.read().split():<br>
&nbsp;&nbsp;&nbsp; if line == &quot;3&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position = True<br>
&nbsp;&nbsp;&nbsp; else:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position = False<br>
&nbsp;&nbsp;&nbsp; if position == True<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print line<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; position = False<br>
f.close()<br><br><div class="gmail_quote">On Fri, May 2, 2008 at 6:55 AM, Kent Johnson &lt;<a href="mailto:kent37@tds.net">kent37@tds.net</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Fri, May 2, 2008 at 3:55 AM, Roel Schroeven<br>
&lt;<a href="mailto:rschroev_nospam_ml@fastmail.fm">rschroev_nospam_ml@fastmail.fm</a>&gt; wrote:<br>
<br>
&gt; &nbsp;Shouldn&#39;t it even be &#39;line = f.next()&#39;?<br>
<br>
</div>Wow, I think Brain Stormer should get a prize. I&#39;m not sure what the<br>
prize is, but his short program has elicited incomplete and inaccurate<br>
answers from three of the top posters to this list! I *think* this is<br>
a complete answer:<br>
<div class="Ih2E3d"><br>
f = open(&#39;file.txt&#39;,r)<br>
</div>for line in f:<br>
 &nbsp; &nbsp; if line.rstrip() == &quot;3&quot;:<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line = f.next()<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print line<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break # put this in if there is only one line you want to print<br>
f.close()<br>
<br>
...awaiting any further corrections :-)<br>
<font color="#888888">Kent<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Tutor maillist &nbsp;- &nbsp;<a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</div></div></blockquote></div><br>