pre-PEP: Print Without Intervening Space
ciuraNOSPAM at zeus.polsl.gliwice.pl
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),,
> 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).
More information about the Python-list