Simple string formatting question

Aahz Maruch aahz at netcom.com
Tue Mar 14 12:20:23 EST 2000


In article <AAtz4.1817$74.26142 at newsc.telia.net>,
Fredrik Lundh <effbot at telia.com> wrote:
>Aahz Maruch <aahz at netcom.com> wrote:
>>
>> 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.

Hmmm...  You're right.  I always thought the following tuple was
illegal:

(1
,2)
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Three sins: BJ, B&J, B&J  --Aahz



More information about the Python-list mailing list