print string+ in for loop

Max nospam at nospam.nospam
Sun May 12 10:21:53 EDT 2002


"Kevin Kohiruimaki" <kevin at no.mail.com> ha scritto nel messaggio
news:20020512225216.32620d8f.kevin at no.mail.com...
> Hi,

[...]

> 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.

print c+ should concatenate c with something. For instance, if you write
print c + '--' you could have the letters from your word followed by the two
minus sign. But in my opinion you miss a variable or something after the
operator.
What would you do whit that statement? Maybe printing the letters on the
same line? If so, try
    print c,
that prints the letters without outputting a new line...





More information about the Python-list mailing list