Hello, checkiomates๐ฑโ๐ค!
This week's Python digest is a deep dive into the language's core and a look at its future. We uncover the magic behind Python's special double-underscore methods, then explore a powerful new feature with functools.placeholder. We peer into the future of the Python ecosystem as we review the findings of a major developer survey, providing insights into trends for 2025. Finally, we put our algorithmic skills to the test with a practical mission: modeling the spread of an epidemic to determine how long it will take to infect a given number of people.
๐กTIP
We allow users to assign hotkeys to "Run Code", "Check Solution" and stop code. You may see current combinations on buttons and change them in editor menu. If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!
๐ MISSION
Epidemic Spread by freeman_lex -
In this problem we will use a simple epidemic model: When a person is infected, they infect other R people, but only the day after their infection (R is called the reproductive factor of infection). No one is infected more than once. Given the initial number of people infected on day 0 N and the reproductive factor of the epidemic R, write a program to determine the number of days it takes for the epidemic to infect T or more people in total.
epid_days(1, 5, 156) == 3 epid_days(2, 1, 11) == 5 epid_days(1, 1, 1) == 0
๐ ARTICLES
functools.Placeholder is new in Python 3.14 -
By reading this article you will understand what functools.Placeholder is for and how to use it effectively.
Explore the key trends and actionable ideas from the latest Python Developers Survey, which was conducted jointly by the Python Software Foundation and JetBrains PyCharm and includes insights from over 30,000 developers.
Single and Double Underscores in Python Names -
Learn Python naming conventions with single and double underscores to design APIs, create safe classes, and prevent name clashes.
๐ฉโ๐ปCODE SHOT
What do you think the following code does?
def checkio(a: list[int], b: list[int]):
result = None
for i, j in zip(a[::-1], b[::-1]):
if i == j: result = i
else: break
return result
๐ Thanks for your attention! Hope to meet you at CheckiO, as well as at our Instagram and Twitter! We are really interested in your thoughts! Please, leave a comment below! โคต
