It’s time to start hacking.1 In this chapter, you learn how to take control of your computer by speaking a language it understands: Python. Nothing here is particularly difficult, so if you know the basic principles of how your computer works, you should be able to follow the examples and try them out yourself. I’ll go through the basics, starting with the excruciatingly simple, but because Python is such a powerful language, you’ll soon be able to do pretty advanced things.
To begin, you need to install Python, or verify that you already have it installed. If you’re running macOS or Linux/UNIX, ...