Daily Python Puzzle

Five Beginner-Level Python Logic Puzzles

For my new book “Python Brain Games” (to appear in 2019, follow my email training program to get updates), I’m experimenting with a new code puzzle type: logics puzzles and brain games. It’s like Sudoku for coders! ๐Ÿค”๐Ÿ Can you solve these five puzzles in five minutes? You can find the solutions at the end …

Five Beginner-Level Python Logic Puzzles Read More »

How to Get Rid of Python’s Map Function With List Comprehension

You may have read that Python’s godfather, Guido van Rossum, doesn’t like the map() function too much. He argues that it can be easily replaced with list comprehension which is not only faster but also more readable and shorter. Here’s an example: You can solve the puzzle on the interactive Finxter app before reading on …

How to Get Rid of Python’s Map Function With List Comprehension Read More »

A List of Lambda Functions? This Python Puzzle May Surprise You…

Guido doesn’t like lambda functions too much. Yet, most large code projects contain a lot of them! (Many coders use lambda functions as GUI callbacks, etc.) In this “Coffee Break Python” email series, we take a pragmatic approach regarding Python code style — living in the “is” rather than in the “should be” world. Can …

A List of Lambda Functions? This Python Puzzle May Surprise You… Read More »