This blog has a really interesting assortment of articles on mathematics and programming. You can use the tags to your right to find topics that interest you, or you may want to have a look at
You can also subscribe to the blog newsletter.
Deep unpacking (or nested unpacking) provides a more powerful way for you to write assignments in your code. Deep unpacking can be used to improve the readability of your code and help protect you against unexpected bugs. Learning about deep unpacking will also be very important in order to make the most out of the structural matching feature that is to be introduced in Python 3.10.
You are sunbathing when you decide to go and talk to some friends under a nearby sun umbrella, but first you want to get your feet wet in the water. What is the most efficient way to do this?
Recursion is a technique that you should have in your programming arsenal, but that doesn't mean you should always use recursion when writing Python code. Sometimes you should convert the recursion to another programming style or come up with a different algorithm altogether.
All Python objects can be used in expressions that should
return a boolean value, like in an
Python's built-in objects are usually Falsy (interpreted as
when they are “empty” or have “no value” and otherwise they
are Truthy (interpreted as
You can define this behaviour explicitly for your own
objects if you define the
__bool__ dunder method.
This problem is a step up from Problem #028 - hidden key. Can you tackle this one?
repr built-in methods are similar, but not the same.
str to print nice-looking strings for end users and use
repr for debugging
Similarly, in your classes you should implement the
dunder methods with these two use cases in mind.