[Tutor] Python Variable Addition
Alan Gauld
alan.gauld at btinternet.com
Mon Apr 30 20:40:17 CEST 2012
On 30/04/12 19:27, Mark Lawrence wrote:
>> print 'Addition of above two numbers are : ', z
>
> Except that you'll get two spaces after the colon :)
OK thats true,
Try this:
print 'Addition of above two numbers are :', z
for one. :-)
But if the number of spaces is critical string formatting is better
still. And better than string addition.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list