I have no idea
Carel Fellinger
cfelling at iae.nl
Mon Mar 12 09:57:44 EST 2001
Brendhan Horne <brendhanhorne at bellsouth.net> wrote:
> In basic you use to be able to do this:
> 10 print "Hello World"
> 20 goto 10
> Run
> If you did that it would run up the screen in an endless loop until you hit
> the ESC key. If you added ; it would cover the whole screen. How do you
> write the equivalent in python?
I'm not much of a BASIC-guy and you're much better of reading the
online tutorials, but...
startup the python interpreter and then:
>>> while 1:
... print "Hello World"
...
Hello World
Hello World
Hello World
Traceback (innermost last):
File "<stdin>", line 1, in ?
KeyboardInterrupt
[[ The KeyboardInterrupt is provoked by pressing
the control-key and the C-key simultaniously. ]]
or add a ',' to the print statement, like:
>>> while 1:
... print "Hello World"
...
Hello World Hello World Hello World Hello World Hello World Hello World
Traceback (innermost last):
File "<stdin>", line 1, in ?
KeyboardInterrupt
--
groetjes, carel
More information about the Python-list
mailing list