Simple string formatting question

Matthew Hirsch meh9 at cornell.edu
Tue Mar 14 16:52:58 CET 2000


Hi All,

I'm trying to print this:

print '%5.3f %5.3f %5.3f 1i'% 
(temp_list[0],temp_list[1],temp_list[2],temp_list.index(min(temp_list)) 
+ 1)

but it won't fit on one line.  It keeps thinking that I have two 
separate incomplete statements.  What is the correct way to get around 
this problem?  Thanks for your help.

Matt



More information about the Python-list mailing list