Post image
Light Mode
Dark Mode
Python Reflections: Mindset, Mutability, and Mastery

Hello, checkiomatesđŸ±â€đŸ‘€!

In this digest, we journey through a spectrum of Python insights—from a thought-provoking exploration of developer philosophy, to practical strategies for avoiding the pitfalls of mutable objects, and a quiz that tests your grasp on Python keywords. To cap it all, we invite you to engage with a hands-on mission featuring a scarecrow robot challenge, blending reflective insights with real coding adventures.

💡TIP

At every mission page, under the editor window, there is a terminal window.
If you want to discover all CheckiO features, visit our tutorial. It's a longread, but it's worth it!

🏁 MISSION

Scarecrow Robot by freeman_lex -

A farmer employs a scarecrow robot to protect his cornfield. The robot follows a path around the plantation, passing through stations circled. Each day, the robot starts at station 1 and follows a series of commands that move it to neighboring stations, both clockwise (1) and counterclockwise (-1).

visits(8, 3, [1, -1, 1, 1, 1, -1, 1, 1]) == 2
visits(5, 1, [1, 1, 1, 1]) == 1
visits(2, 1, [1]) == 1

📖 ARTICLES

Developer philosophy -

The author was recently invited with other senior devs to give a lightning talk on their personal development philosophy. This post captures those thoughts.

The Mutable Trap: Avoiding Unintended Side Effects in Python -

Ever had a Python function behave strangely, remembering values between calls when it shouldn’t? You’re not alone! This is one of Python’s sneakiest pitfalls—mutable default parameters.

Python Keywords: An Introduction Quiz -

Python keywords are reserved words with specific functions and restrictions in the language. These keywords are always available in Python, which means you don’t need to import them. Understanding how to use them correctly is fundamental for building Python programs.

đŸ‘©â€đŸ’»CODE SHOT

How do you think, what the following code does?

def ??????????(text: str, begin: str, end: str) -> str:

    left, _, text = text.rpartition(begin)
    text, _, right = text.partition(end)
    return text if end not in left else ''

🙌 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: March 4, 2025, 6:17 p.m.
2
40
User avatar
freeman_lex