file object: seek and close?

Jeff Epler jepler at
Fri Sep 19 02:35:43 CEST 2003

Well, I didn't have any problems running a similar program.

Here's the program I wrote:
f = open("/tmp/example", "w")

f = open("/tmp/example", "r")

for line in f: print line.strip(),
for lines in f: print line.strip(),

And here's the output:
a b c
a b c

More information about the Python-list mailing list