June 2000
Intermediate to advanced
556 pages
8h 45m
English
In the examples so far, we have used Python interactively by typing commands at the >>> command prompt for immediate execution. To wrap up the Python-existence proof, we will execute the same commands, but this time execute them from a file. Create a file foo.py in some convenient location with the following contents:
CD-ROM reference=2018.txt print 1+2 print "Hello World"
At the command prompt of your system, type python foo.py and press Enter. The following output should appear:
CD-ROM reference=2019.txt 3 Hello World
You should now be back at your system's command prompt.
On Linux, a technique known as “pound ... |
Read now
Unlock full access