Cover of Python Crash Course 3rd Edition by Eric Matthes, featuring bold typography on a clean technical design representing Python programming

Pages

553

Published

2023

Python ✨ New

Python Crash Course, 3rd Edition

A Hands-On, Project-Based Introduction to Programming in Python

Go from zero Python knowledge to building real projects β€” a game, a data visualization, and a web app β€” in a single volume.

Python Crash Course is a fast-paced introduction to Python for anyone who wants to learn the language by doing. The first half builds your foundation: variables, lists, dictionaries, functions, classes, and file handling. The second half puts that knowledge to work in three complete projects. By the end, you will have built a Space Invaders-style game with Pygame, generated data visualizations with Matplotlib and Plotly, and deployed a simple web application with Django.

Advertisement

About this book

Python Crash Course cuts straight to the point. In 553 pages, Eric Matthes takes you from your first variable assignment to a deployed web application, a working arcade game, and publication-quality data charts. Every concept is introduced when you need it, and every chapter ends with exercises that confirm you actually absorbed it β€” not just read it.

The book is split into two clean halves. Part one covers the language itself: data types, control flow, functions, object-oriented programming, exceptions, and file I/O. The pace is brisk but never sloppy. Matthes explains exactly what Python is doing under the hood without turning every page into a detour through computer science theory.

Part two is three independent projects you build from scratch:

  • Alien Invasion β€” a 2D arcade game using the Pygame library, which teaches event-driven programming, sprite management, and game loops
  • Data Visualization β€” a series of charts and interactive graphs using Matplotlib and Plotly, pulling from both generated and real-world CSV and JSON data sets
  • Learning Log β€” a Django web application with user authentication, a database backend, and deployment to a live server

The third edition is fully updated for Python 3.11 and reflects current best practices across all three project stacks. The Django project targets Django 4.1. Matplotlib and Plotly examples use current API conventions. Setup instructions cover Windows, macOS, and Linux throughout.

This is the book you hand to a colleague who asks where to start with Python, because it actually finishes what it starts. The projects are complete, the code runs, and the skills transfer directly to real work.

🎯 What you'll learn

  • Write Python programs using variables, lists, dictionaries, loops, and conditionals with confidence
  • Define classes and use object-oriented principles to structure larger programs
  • Handle files, exceptions, and user input in scripts that don't break on bad data
  • Build a complete 2D arcade game using Pygame, including collision detection, scoring, and a game loop
  • Generate static charts and interactive web-based visualizations from CSV and JSON data using Matplotlib and Plotly
  • Create a functioning Django web application with a database, user login system, and deployment to a live server
  • Debug programs systematically using Python's built-in tools and error messages
  • Apply testing basics with Python's unittest module to verify your own code

πŸ‘€ Who is this book for?

  • Complete beginners who have never written a line of code and want a structured, project-driven path into Python
  • Self-taught programmers who picked up scattered snippets online and want to fill in the gaps with a coherent foundation
  • Students in non-CS disciplines β€” science, journalism, finance β€” who need Python as a practical tool, not an academic subject
  • Developers experienced in another language who want the fastest credible on-ramp to Python syntax and idioms
  • Educators and bootcamp instructors looking for a classroom-tested text with exercises and clearly scoped projects

Table of contents

  1. 01

    Getting Started

    Install Python and set up a working development environment on Windows, macOS, or Linux. Write and run your first program to confirm everything is wired up correctly.

  2. 02

    Variables and Simple Data Types

    Learn how Python stores and manipulates strings, integers, and floats. Understand variable naming, basic string methods, and how to avoid common type errors.

  3. 03

    Introducing Lists

    Create and modify ordered lists of values. Practice slicing, iterating, and using common list methods to add, remove, and reorganize data.

  4. 04

    Working with Lists

    Use for loops and list comprehensions to process collections efficiently. Learn how range() works and how to apply numerical lists to real problems.

  5. 05

    if Statements

    Write conditional logic that branches based on data. Understand comparison operators, Boolean expressions, and how to test for membership in lists.

  6. 06

    Dictionaries

    Store and retrieve key-value data with dictionaries. Nest lists and dictionaries inside each other to represent structured, real-world information.

  7. 07

    User Input and while Loops

    Accept input from users at the command line and use while loops to keep programs running until a condition is met. Build a simple interactive program.

  8. 08

    Functions

    Define reusable functions with parameters, default values, and return values. Learn how to organize code into modules and import them cleanly.

  9. 09

    Classes

    Model real-world objects using Python classes. Write __init__ methods, define instance and class attributes, and use inheritance to avoid repeating code.

  10. 10

    Files, Exceptions, and Tests

    Read from and write to files, catch exceptions gracefully, and write basic unit tests with unittest so your programs handle unexpected input without crashing.

Frequently asked questions

Do I need any prior programming experience to read this book?

No prior experience is required. The book assumes you have never programmed before and builds every concept from scratch before applying it in a project.

Which version of Python does this edition cover?

The third edition targets Python 3.11 and reflects current library versions including Django 4.1, Matplotlib, and Plotly. It is the most up-to-date edition as of its January 2023 release.

Is the source code for the projects available separately?

No Starch Press provides companion resources for the book including code files. Check the publisher's website for the official download link associated with this edition.

Is this book suitable for someone who already knows another programming language?

Yes. Matthes moves quickly through the fundamentals, so experienced programmers will find the first half a fast read rather than a grind. The project section is useful regardless of prior experience.

Does the book cover web development, data science, or both?

It covers both at an introductory level. One project uses Django for web development and another uses Matplotlib and Plotly for data visualization, giving you a grounded starting point in each area.

How long will it take to work through the whole book?

Most readers finish in four to eight weeks working an hour or two per day, though that varies significantly depending on how much time you spend on the exercises and projects.

Advertisement

You might also like

πŸ“¬ Weekly Newsletter

Stay ahead of the curve

Get the best programming tutorials, data analytics tips, and tool reviews delivered to your inbox every week.

No spam. Unsubscribe anytime.