[Tutor] Beginner ...

Alan Gauld alan.gauld at blueyonder.co.uk
Sat Dec 20 19:35:04 EST 2003


>>> the_world_is_flat = 1
>>> if the_world_is_flat:
...     print "Be careful not to fall off!"

Close, but the >>> and ... bits are produced by the Python 
interactive interpreter. The program itself looks like this:

the_world_is_flat = 1
if the_world_is_flat:
    print "Be careful not to fall off!"

So thats all you need to type into your .py file

HTH,

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list