[Tutor] updating a print statement

Bryan Fodness bryan.fodness at gmail.com
Mon Dec 10 18:56:47 CET 2007


I have a print statement in a for loop so I can watch the progress

for line in file(file):
    the_line = line.split()
    if the_line:
        print ("Index = %.2f") %index

Is there a way that only one line will be output and the variable is updated
rather than one line for every index.

Thanks,
Bryan

-- 
"The game of science can accurately be described as a never-ending insult to
human intelligence." - João Magueijo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071210/49233ec2/attachment.htm 


More information about the Tutor mailing list