November 2018
Beginner
304 pages
7h 35m
English
If you want to run a Python program, simply type python foo.py at the shell command prompt (make sure it's not Python's interactive prompt).
The following screenshot demonstrates how to call a Python program from the command line. This particular program simulates rolling a number of dice; the actual program will be discussed later in this book:

Files saved with the .py extension are called modules and can be called individually at the command line or imported into a program, similar to ...
Read now
Unlock full access