Simple string formatting question

Michal Bozon bozon at
Tue Mar 14 17:06:45 CET 2000

On Tue, 14 Mar 2000, Matthew Hirsch wrote:

> 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

Try to let the beginning bracket after percent sign at the end of first
line. Maybe it helps.

Michal Bozon

More information about the Python-list mailing list