Jump to ratings and reviews
Rate this book

Python Brain Teasers: Exercise Your Mind

Rate this book
We geeks love puzzles and solving them. The Python programming language is a simple one, but like all other languages it has quirks. This book uses those quirks as teaching opportunities via 30 simple Python programs that challenge your understanding of Python. The teasers will help you avoid mistakes, see gaps in your knowledge, and become better at what you do. Use these teasers to impress your co-workers or just to pass the time in those boring meetings. Teasers are fun! At the beginning of each chapter I'll show you a short Python program and will ask you to guess the output. The possible answers can Here's how to approach the puzzles. Read through the code. Before moving on to the answer and the explanation, go ahead and guess the output. After guessing the output, run the code and see the output yourself. Finally proceed to read the solution and the explanation. The puzzles are short enough to solve on a coffee break, so carry them with you, have fun, and share them with co-workers. People who make mistakes during the learning process learn better than people who don't. If you use this approach at work when fixing bugs, you'll find you enjoy bug hunting more and become a better developer after each bug you fix. Many of these puzzles are from the author's lessons learned (and others) of shipping bugs to production. He often uses the puzzles as quizzes during conferences and meetups, and they tend to create a buzz of excitement. What You

118 pages, Paperback

Published September 28, 2021

2 people are currently reading
9 people want to read

About the author

Miki Tebeka

17 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (16%)
4 stars
5 (83%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 of 1 review
Profile Image for Alexander.
22 reviews
October 18, 2025
If you are new to Python and have read an introductory book such as Head First Python, then you will find this book lots of fun. It covers lots of unusual aspects of Python, and I like how each puzzle is presented, encouraging you to have a go first.

I wouldn't consider myself a beginner or an advanced Python programmer, and I found about nine or ten of the puzzles really thought-provoking. The rest were still fun to read, but some of the puzzles were too simple and easy to guess. However, I assume that anyone reading this book will find at least one interesting puzzle.
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.