Re: [Tutor] print command

2005-03-22 Thread nicke
On Mon, 21 Mar 2005 05:57:28 -0500 Kent Johnson <[EMAIL PROTECTED]> wrote: > Shitiz Bansal wrote: > > Now this is so basic, i am feeling sheepish asking > > about it. > > I am outputting to the terminal, how do i use a print > > command without making it jump no newline after > > execution, which

Re: [Tutor] print command

2005-03-21 Thread Alan Gauld
> You can get full control of the output by using sys.stdout.write() instead of print. Note the > arguments to write() must be strings: > > import sys > sys.stdout.write(str(1)) > sys.stdout.write(str(2)) > sys.stdout.write(str(3)) > sys.stdout.write('\n') > > Or you can accumulate the values into

Re: [Tutor] print command

2005-03-21 Thread Kent Johnson
Shitiz Bansal wrote: Now this is so basic, i am feeling sheepish asking about it. I am outputting to the terminal, how do i use a print command without making it jump no newline after execution, which is the default behaviour in python. To clarify: print 1 print 2 print 3 I want output to be 123

Re: [Tutor] print command

2005-03-20 Thread Lutz Horn
Hi, > To clarify: > > print 1 > print 2 > print 3 > > I want output to be > > 123 >>> l = [1, 2 3] >>> i = int("".join(map(str, l))) >>> print i, type(i) 123 If you don't care about the blanks, you can use >>> print 1, 2, 3 1 2 3 Lutz -- pub 1024D/6EBDA359 1999-09-20 Lutz Horn <[EMAIL

[Tutor] print command

2005-03-20 Thread Shitiz Bansal
Now this is so basic, i am feeling sheepish asking about it. I am outputting to the terminal, how do i use a print command without making it jump no newline after execution, which is the default behaviour in python. To clarify: print 1 print 2 print 3 I want output to be 123 whereas by default