How Does a Computer Run a Python Program?
In order to understand what happens when you’re programming, it helps to have have a mental model of how a computer executes a program.
The computer is assembled from pieces of hardware, including a processor that can execute instructions and do arithmetic, a place to store data such as a hard drive, and various other pieces, such as a screen, a keyboard, an Ethernet controller for connecting to a network, and so on.
To deal with all these pieces, every computer runs some kind of operating system, such as Microsoft Windows, Linux, or macOS. An operating system, or OS, is a program; what makes it special is that it’s the only program on the computer that’s allowed direct access to the hardware. When ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access