print string+ in for loop

Chris Liechti cliechti at gmx.net
Sun May 12 10:15:36 EDT 2002


Kevin Kohiruimaki <kevin at no.mail.com> wrote in 
news:20020512225216.32620d8f.kevin at no.mail.com:

> Hi,
> 
> I can do:
> 
> word = "horse"
> 
> for c in word:
>   print c,
> 
> But I can not do:
> 
> for c in word:
>   print c+
> 
> What is the reason for not implementing it in the language? Thanks for
> answering.

i you dont want the spaces, use sys.stdout.write(c)
there is not need for tricky syntaxes for anything....

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list