python coding contest
Hans Nowak
hans at zephyrfalcon.org
Sat Dec 31 20:14:50 EST 2005
André wrote:
> Hans Nowak wrote:
>
>>André wrote:
>
>
>>I don't know if this suggestion has been made already, but it seems to
>>me that the end of the expression
>>
>> ... for u in(3,14,10))
>>
>>can be written as:
>>
>> ... for u in 3,14,10)
>>
>>which would shave off a character. Tuples don't always need parentheses...
>>
>
> I tried ... but, in this case, it appears that they do, unfortunately
> :-(
Ah, you are right. It works for a list comprehension, but not for a
genexp. :-(
--
Hans Nowak
http://zephyrfalcon.org/
More information about the Python-list
mailing list