Never Iterate a Changing Dict
Yesterday I noticed a bug in a Python program that only appeared when running it with the new Python 3.6.
It turned out that the program had been running a slippery slope all the time.
Yesterday I noticed a bug in a Python program that only appeared when running it with the new Python 3.6.
It turned out that the program had been running a slippery slope all the time.
This year my brother’s family sent us a puzzle in their Christmas package, mentioning that they already solved it and we should give it a try over the Christmas holidays, too. The puzzle is called “36 Cube” and looks like this:
The “36 Cube” consists of a board with a 6x6 grid of tower stubs and 36 towers in 6 different heights and colors which need to be stacked on the stubs so that they all have the same height, forming a cube like in the picture. Also, no two towers of the same color may appear in the same row or column - similar to a Sudoku puzzle.
The puzzle looked tricky already, but it turned out it was even trickier than I first thought.
Hurray! It’s Christmas time - and Python 3.6 has been released!
One of the many goodies packed into the new release are formatted string literals, or simply called “f-strings”. In this blog post I’ll explain why this is good news.