print function and unwanted trailing space

candide candide at free.invalid
Sat Aug 31 09:51:15 EDT 2013


Le 31/08/2013 13:24, Ned Batchelder a écrit :

> For a beginner course, the trailing space is fine, use this code.

I was really expecting there was a trick but I'll follow your advice, 
after all the trailing space is invisible!

Nevertheless, this can be quite annoying. For instance, some automated 
program testing (cf. http://www.spoj.com/, http://acm.timus.ru/, etc) 
expect the exact output to get accepted, no byte more or a byte less.








More information about the Python-list mailing list