"HappyHippy" wrote:

> More of a minor niggle than anything but how would I remove the
> aforementioned space?
>
> eg.
> strName = 'World'
> print 'Hello', strName, ', how are you today?'
>
> comes out as "Hello World , how are you today?"
>
> Have googled, and worked my way through the first 7 chapters of Byte of
> Python, but to no avail...

you can concatenate the strings before passing them to print:

    text = 'Hello' + strName + ', how are you today?'
    print text

or do the same on one line

    print 'Hello' + strName + ', how are you today?'

or use string formatting (the % operator), or write to the special sys.stdout
file object (output to files is discussed in chapter 12).

</F>



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to