Simple string formatting question
effbot at telia.com
Tue Mar 14 17:15:28 CET 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, temp_list,
> temp_list, 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.
More information about the Python-list