Simple string formatting question
Fredrik Lundh
effbot at telia.com
Tue Mar 14 11:15:28 EST 2000
Aahz Maruch <aahz at netcom.com> wrote:
> There are many ways; here's the simplest:
>
> print '%5.3f %5.3f %5.3f 1i' % (temp_list[0], temp_list[1],
> temp_list[2], temp_list.index(min(temp_list))+1)
>
> Python is smart enough to know that a comma means that the line can't
> end. We generally recommend that you indent the continuation line.
footnote: it's not the comma, it's the open parenthesis.
</F>
More information about the Python-list
mailing list