[Tutor] Python Variable Addition
breamoreboy at yahoo.co.uk
Tue May 1 00:57:21 CEST 2012
On 30/04/2012 19:40, Alan Gauld wrote:
> 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.
True indeed, but which of the three versions of string formatting that
I'm aware of?
More information about the Tutor