Danny  <[EMAIL PROTECTED]> wrote:
>The programs output will be:
>text
>text
>(etc)
>
>How could I make this print: texttexttexttexttext?
>Ive researched and looked through google and so far I can't find 
>anything that will help (or revelent for that matter).

I'm kind of surprised this isn't a FAQ (if it's in the FAQs, I
can't find it).

http://docs.python.org/tut/node5.html#SECTION005200000000000000000
tells you how to use

    print "text", # Note the comma. Oh, and the correct comment character.

to get

text text text text text

http://docs.python.org/tut/node9.html#SECTION009100000000000000000
hints that what you want may be

    sys.stdout.write("text")

to get

texttexttexttexttext

Beware that in either case you'll need an additional print at the
end of the loop to get the final newline back.

-- 
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
  ___  |  "Frankly I have no feelings towards penguins one way or the other"
  \X/  |    -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to