pre-PEP: Print Without Intervening Space

Marcin Ciura ciuraNOSPAM at
Fri Mar 11 17:13:43 CET 2005

Larry Bates wrote:
> I fail to see why
> your proposed solution of:
>     for x in seq:
>         print fn(x),,
>     print
> is clearer than:
>     print ''.join([fn(x) for x in seq])

Thank you for your input. The latter form is fine with me personally,
but you just can't explain it to complete novices. My proposal aims
at making programming easier for them.

> Also your statement:
>   print 'The phone number is (',,extension,,')', number,,'.'
> requires three double commas and can already be written
> more clearly as:
>   print 'The phone number is ('+extension+') '+number'.'

I agree with you in this point (if extension and number are strings).

Best regards,

More information about the Python-list mailing list