View Single Post
Old Dec 10th, 2005, 2:41 PM   #2
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
I can't see any reason why you're doing all of this manual seeking and reading - this isn't C. Python lets you iterate over the lines in a file really easily:
myFile = file("fibnumbers.txt")
for line in myFile:
    print line
This will go through each line in the file and print it. Simple eh?
Cerulean is offline   Reply With Quote