Python Workout

200 ten-minute exercises to make Python second nature.

Cover of Python Workout, Second Edition by Reuven M. Lerner

You can read about Python for months and still freeze in front of an empty editor. Reading teaches you what a dictionary comprehension is. It doesn’t give you the reflex to reach for one at the moment you need it. That only comes from writing code often enough that the syntax stops being the hard part, and you can spend your attention on the actual problem.

Python Workout, Second Edition is 200 exercises built for exactly that. Each is small enough to finish with a cup of coffee. Each comes with a full solution that explains not only what works but why, and most come with variations for when you want to push a little harder.

What you’ll work through

  • Numeric types, strings, lists and tuples
  • Dictionaries and sets — and developing a feel for which one a problem wants
  • Reading and writing files, in the formats you actually meet
  • Functions, and functional programming with comprehensions
  • Modules and packages
  • Objects, iterators and generators

Twelve chapters, 240 pages, and a second edition that reflects the latest best practices for Python coders.

Who it’s for

Programmers who know Python’s syntax and want it to become automatic. If you’ve finished a beginner course, or you write Python occasionally and want to write it confidently, this is aimed at you. It is not a first introduction to programming, and it doesn’t try to be a reference.

Get the book

  • Manning — print and ebook, and includes access to liveBook
  • Amazon
  • O’Reilly — included with a Learning Platform subscription

Manning Publications, December 2025. ISBN 9781633435353.

Keep practicing after the last exercise

Two hundred exercises is a lot, and it still ends. If you want to keep going:

  • Bamboo Weekly — a new data-analysis exercise every week, built on real public datasets, with a full worked solution. Free.
  • Pandas Workout — the same 200-exercise treatment for data analysis with Pandas.
  • My courses — if you’d rather be walked through it than work alone.

About the author

I’m Reuven Lerner, and I’ve been teaching Python and Pandas full time since 1995 — to engineers at Apple, Cisco, IBM, Intel, PayPal, SANDisk, VMWare, Western Digital and many others. I write a blog about Python, publish Bamboo Weekly, and have written Python Workout and Pandas Workout for Manning, as well as AI-Assisted Python for Nonprogrammers for O’Reilly.