[Tutor] Re: Tutor digest, Vol 1 #1417 - 19 msgs

Charlie Clark charlie@begeistert.org
Mon, 11 Feb 2002 10:09:36 -0500


>> s =3D ''
>> for item in [1,2,3]:
>>     s =3D s+str(item) # just convert to a string and concatenate
>> f.write(s)          # then write the final string
>
>Just to go on from my example, you could redirect print-output to a 
file
>like such:
>
>for item in [1,2,3]:
>    print >> f, str(item),
>
>That's starting to look a little less like Python to me, though. <grin
>

Yep, is anybody using this ugly extension=3F Guido get rid of it! ;-)
I hate backticks as well which might seem fine for shell-freaks but 
really aren't consistent with the rest of the language and bound to 
throw off people who are new to programming in general.

Charlie