
Get a free eBook (PDF or ePub) from Manning as well as access to the online liveBook format (and its AI assistant that will answer your questions in any language) when you purchase the print book.
The only way to master a skill is practice, practice, practice. That’s exactly what you’ll do in this book! In this instantly-valuable book you’ll work through 200 carefully selected exercises that flex your programming muscles.
You’ll practice core Python language features and techniques that reinforce the programming patterns you’ll use every day and build the skills you need to troubleshoot your programs.
In Python Workout, Second Edition you’ll find 200 exercises, including:
• Working with text using strings
• Mastering dictionaries and sets
• Reading, writing, and manipulating files
• Functional programming with comprehensions
• Python modules and packages
• Creating iterators and generators
About the technology
Become a champion Python programmer by making its most powerful features second nature! In this unique book, internationally-recognized Python trainer Reuven Lerner builds your mental muscle by guiding you through 200 targeted exercises.
About the book
Python Workout, Second Edition is a hands-on training program designed to boost your productivity and code quality. You’ll practice everything from basics like strings and dictionaries to techniques for writing elegant, data-agnostic code with dynamic typing, generic functions, and comprehensions. Each exercise includes a detailed solution along with additional challenges that help you push your skills even farther.
What’s inside
• Lock in essential Python skills
• Improve your code readability and maintainability
• Prepare for AI-assisted workflows
About the reader
For beginning to intermediate Python programmers.
About the author
Reuven M. Lerner teaches Python at companies around the world and at LernerPython.com. He also wrote Pandas Workout.
Table of Contents
1 Improving your Python with practice
2 Numeric types
3 Strings
4 Lists and tuples
5 Dictionaries and sets
6 Files
7 Functions
8 Functional programming with comprehensions
9 Modules and packages
10 Objects
11 Iterators and generators
12 Where to from here?
From the Publisher


“Chock-full of good examples.”
Jason C. McDonald, Author of Dead Simple Python

“Crucial for writing clean, efficient, and maintainable code in big tech.”
Heng Zhang, Salesforce

“So much better than just watching videos or reading reference material.”
Jim Welch, Microsoft

why this book?
Python Workout, Second Edition, helps you build real programming fluency by guiding you through 50 carefully chosen exercises that reinforce essential Python skills and common patterns you’ll use in everyday coding.
By focusing on hands-on practice with updated content for the latest version of Python, it strengthens problem-solving abilities, boosts confidence, and deepens understanding of how Python works beyond just reading about it.
Through repeated, practical challenges with detailed solutions, the book improves fluency, muscle memory, and the ability to tackle new coding tasks independently.

about Manning
Manning helps developers and tech professionals stay ahead in a fast-moving industry with expert-led books, videos, and projects. Learning never stops, but it’s hard to keep up, so we focus on content that’s practical, clear, and trusted. As an independent publisher, we adapt quickly, from pioneering early-access books to offering DRM-free eBooks. Our series, like “In Action” and “In a Month of Lunches”, reflect a commitment to making complex topics accessible.
Add to Cart
Add to Cart
Add to Cart
Add to Cart
Add to Cart
Add to Cart
Customer Reviews
4.5 out of 5 stars 24
3.9 out of 5 stars 5
4.3 out of 5 stars 17
4.2 out of 5 stars 4
5.0 out of 5 stars 7
4.8 out of 5 stars 12
Price
$73.01$73.01 $43.47$43.47 $41.99$41.99 $42.23$42.23 $52.53$52.53 $49.44$49.44
Level of proficiency
Intermediate Intermediate Intermediate Intermediate Intermediate Advanced
About the reader
For readers with intermediate Python skills. For developers who know Python. For beginning-intermediate programmers. Accessible to anyone with a basic knowledge of Python and finance—no special skills required. For Python programmers familiar with tools like pandas and NumPy, and the basics of statistics. For Python programmers and data analysts.
Special features
Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant.
Pages
648 376 384 336 560 440
Publisher : Manning Publications
Publication date : January 6, 2026
Edition : 2nd
Language : English
Print length : 240 pages
ISBN-10 : 1633435350
ISBN-13 : 978-1633435353
Item Weight : 15.4 ounces
Dimensions : 7.38 x 0.6 x 9.25 inches
Best Sellers Rank: #252,173 in Books (See Top 100 in Books) #96 in Computer Programming Languages #100 in Python Programming
Customer Reviews: 5.0 5.0 out of 5 stars (14) var dpAcrHasRegisteredArcLinkClickAction; P.when(‘A’, ‘ready’).execute(function(A) { if (dpAcrHasRegisteredArcLinkClickAction !== true) { dpAcrHasRegisteredArcLinkClickAction = true; A.declarative( ‘acrLink-click-metrics’, ‘click’, { “allowLinkDefault”: true }, function (event) { if (window.ue) { ue.count(“acrLinkClickCount”, (ue.count(“acrLinkClickCount”) || 0) + 1); } } ); } }); P.when(‘A’, ‘cf’).execute(function(A) { A.declarative(‘acrStarsLink-click-metrics’, ‘click’, { “allowLinkDefault” : true }, function(event){ if(window.ue) { ue.count(“acrStarsLinkWithPopoverClickCount”, (ue.count(“acrStarsLinkWithPopoverClickCount”) || 0) + 1); } }); });
3 reviews for Python Workout, Second Edition: 200 ten-minute exercises
Add a review
Original price was: $49.99.$47.49Current price is: $47.49.

Sanjay Basu, PhD –
Python as a Muscle Memory Skill
I have read a lot of Python books over the years. Many explain syntax well. Some explain concepts deeply. Very few actually change how you think when you sit down to write code. Python Workout Second Edition does exactly that.This is not a book you read cover to cover in a weekend. It is a book you live with. You do an exercise. You think. You write. You rewrite. You check the solution. And slowly something important happens. Python starts to feel natural rather than rehearsed.The real strength of this book is the structure. Two hundred short exercises that fit into real life. Ten minutes before a meeting. Ten minutes after dinner. Ten minutes when your brain is tired but not done for the day. That cadence matters. It builds consistency. And consistency is how fluency is earned.Several chapters stand out.The early chapters on strings and collections are deceptively simple. Exercises like Pig Latin and dictionary transformations look playful at first glance. They are not. They quietly train you to think in terms of iteration, transformation, and clarity. This is where Pythonic thinking starts to take root.The section on dictionaries and sets is excellent. Not just how to use them, but how to think with them. Exercises like Dictdiff and FlexibleDict sharpen your intuition about data structures and tradeoffs. You start choosing the right structure without overthinking it.The chapter on files is practical in the best sense. Reading. Writing. Transforming. Processing real data. These are the kinds of problems that show up in production code, not tutorials. The exercises here feel honest and useful.Functions and scoping are handled with care. Nested functions and variable scope are topics that confuse even experienced developers. The exercises force you to confront those edge cases directly. No hand waving. Just code and consequences.The later chapters on comprehensions, modules, objects, and generators are where the book really earns its place. Writing your own iterator. Implementing generator logic. Understanding why yield matters. These are not optional skills anymore. They are core Python. The exercises make them stick.What I appreciated most is the tone. Calm. Clear. Confident without being smug. The solutions explain not just what works, but why it works. The additional challenges invite you to push further without pressure.This second edition also feels current. Modern Python features are treated as first class citizens. There is an implicit understanding that Python now lives alongside automation, data work, and AI assisted workflows. The book prepares you for that reality without ever turning into hype.If you are brand new to Python, this book will give you a strong foundation. If you already write Python for a living, this book will quietly fix habits you did not know needed fixing. Either way, you will come out sharper.
Tony Holdroyd –
All You Need to Stop Writing Elementary Code
If you feel stuck in that gap where you know Python syntax but struggle to solve problems “Pythonically,” this book is the perfect bridge.Most programming books are dense walls of theory that require hours of focus. “Python Workout” is different because it respects your time. As the title suggests, the 200 exercises are designed to be “snackable”—you can tackle a challenge in about 10 minutes, making it incredibly easy to fit into a busy schedule.What makes it work:Muscle Memory over Theory: It treats coding like a sport or an instrument. Just as a pianist practices scales, this book forces you to practice the small, repetitive patterns (like list comprehensions, iterators, and generators) until they become second nature.The “Why” Behind the “How”: It doesn’t just ask you to solve a problem; it provides optimization tips that teach you how to write code that is cleaner and more efficient. It pushed me from writing code that simply “works” to writing code that is actually good.Modern Standards: A nice touch is that the code is polished and updated for Python 3.12+, so you aren’t learning outdated habits.The Limitations:It is fantastic for Beginner-to-Intermediate growth, but if you are an advanced engineer looking for deep dives into concurrency (multi-threading or multi-processing), you won’t find that here.Bottom Line: You don’t need to read it cover-to-cover. Keep it on your desk, do one exercise a day, and you will see a massive difference in your coding confidence. Highly recommended for anyone wanting to upgrade their skills for interviews or new AI projects.
J.R. Ewing –
Up Your Python Programming Skills by Filling in Your Knowledge Gaps.
As I read Python Workout, Second Edition, I could not help but wish I had read this book sooner. The author includes all of the important Python concepts. With each, a detailed discussion is provided, including clarifications for concepts that are frequently misunderstood. Each chapter is filled with a number of problems and solutions, with each solution accompanied with detailed explanations. The best part of studying each solution is seeing and learning the right way to tackle coding problems in Python. For readers who want to reinforce their learning, there are additional problems that are provided, problems that leverage what was discussed in that chapter. In fact, this would be an ideal book to use in a classroom setting.For those with Python experience, this book should be read cover-to-cover to fill in your Python knowledge gaps. However, with the wonderful real-world solutions, this book should also be kept close at hand to be consulted when you find yourself puzzling over a problem or writing too much code and wondering, “Am I solving this problem in the best possible fashion?”Finally, the author writes very clearly and the examples and solutions are equally clear. Because the book uses a “here’s what you need to know and here’s how you apply it” approach, the book does not read like a reference book. Instead, it is very approachable and will serve as a valuable resource.