Google's Python Class is the material Google has used internally to introduce Python to employees with a little programming experience. It combines written lessons, lecture videos, and downloadable exercises, and it is free to use under a Creative Commons licence. The class was originally taught as an intensive two-day course, which explains its compact, fast-moving structure.
It is not aimed at complete beginners. The introduction states that you should already know what a variable or an if statement is, and the pace assumes you can read short code examples without step-by-step explanations.
Lessons and exercises
The written sections follow the order of the videos, and each ends with a link to the matching exercise:
| Stage | Lessons | Exercises |
|---|---|---|
| Getting started | Set Up, Introduction | installing Python and running hello.py |
| Core data types | Strings, Lists, Sorting, Dicts and Files | Basic exercises: string and list drills, word count, mimic |
| Text processing | Regular Expressions | Baby Names: extracting data from HTML files |
| Working with the system | Utilities: files, directories, processes, URLs | Copy Special and Log Puzzle |
The later exercises are complete small programs rather than fill-in-the-blank tasks: parsing files, calling external commands, and downloading images from URLs to reassemble a picture.
What to expect from the videos
The lecture videos are a useful companion, but they were recorded before Python 3. The set-up page warns that some code shown in the videos no longer works and points to the updated examples in the written material. In practice, the text lessons and exercises are the reliable core, and the videos help most for seeing how an experienced programmer explains each idea.
The written pages are available in several languages through machine translation, but the original English version is the most precise.
Who will get the most from it
The class suits developers coming from another language, students who have finished an introductory programming course, and anyone who needs Python for scripting or data processing at work. Its strength is practical fluency with strings, lists, dictionaries, files, and regular expressions, the everyday tools of Python scripting.
It does not cover object-oriented programming, web frameworks, or data science libraries. After finishing, those are natural next steps, and Google's Machine Learning Crash Course in this category is one option if data and models interest you.
A practical way to work through it
- Complete the set-up before anything else, and confirm you can run a script and use the interactive interpreter.
- Read one written section, then solve its exercise before watching the corresponding video.
- Run each exercise file after every function you complete; the basic exercises include simple checks on your results.
- For the Utilities exercises, work in a separate folder, since the programs create, copy, and download files.