Blog Posts
-
How to simplify the code and improve its readability with the partial() function?
dr. Dobreff Csaba 10th jan 2026The [crayon-6a2079c3ad193172997893-i/] function in the [crayon-6a2079c3ad196631867678-i/] module is used to create a new callable object from a callable object having multiple parameters by fixing the values of certain parameters, thus...
-
Why Are Annotations Useful?
dr. Dobreff Csaba 10th jan 2026In addition to comments written above or beside lines of code, as well as documentation strings (docstrings), Python also allows us to use annotations to help improve the understanding of...
-
How can you quickly and easily generate word frequency statistics from a text, stored as key-value pairs?
dr. Dobreff Csaba 10th jan 2026There are many ways to solve this problem, but short yet clear one- or two-line solutions are generally preferred. Below, we present two such approaches. What these two techniques have...
-
Did you know that a function in Python can have attributes?
dr. Dobreff Csaba 10th jan 2026You probably know that in Python, everything is an object. Objects have attributes that can represent data (e.g., numbers or strings), but they can also contain executable codes. These are...