Python 2.5 idle and print command How do I suppress a line feed?

Will McGugan will at willNOmcguganSPAM.com
Thu Nov 23 14:44:38 EST 2006


notejam wrote:
> Hi,
> I am having a problem with print statements always cause a line feed.
> I need to print a line of text, then the next print statement will
> start printing where the last one stopped rather than drop down a line.
> 
> In basic we can do this with print "texst";   followed by next command
> print "text2"
> So how do I do that in python?
> 

Or if you want to get rid of the space...

import sys
sys.stdout.write("texst")
sys.stdout.write("text2")

-- 
--
work: http://www.kelpiesoft.com
blog: http://www.willmcgugan.com



More information about the Python-list mailing list