Post image
Light Mode
Dark Mode
Python's Microcosm, Macrocosm, & Modeling

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.

The State of Python 2025 -

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! โคต

Created: Sept. 1, 2025, 4:26 p.m.
0
41
User avatar
freeman_lex