Re: [Tutor] read from standard input

2008-02-14 Thread Tiger12506
> while 1 < 2: while 1: or while True: is more common >x = raw_input() raw_input() always return a string, no matter what you type in. >if type(x) != int or x == 11: type(x) is always x can never be 11, but can possibly be '11'. (Notice quotes indicating string instead of integer) If

Re: [Tutor] read from standard input

2008-02-13 Thread John Fouhy
On 14/02/2008, Andrei Petre <[EMAIL PROTECTED]> wrote: > Hello, > > I want to read from the standard input numbers until i reach a certain value > or to the end of the "file". > What is the simplest, straightforward, pythonic way to do it? > > a sketch of how i tried to do it: > [code] > while 1 <