Category: Python

  • Python weekend check: Detecting Saturday and Sunday with weekday()

    How can you tell if a Python datetime is a weekend (i.e., Saturday or Sunday)? Invoke weekday(). It returns an int; Mon is 0, Sat is 5 and Sun is 6. So:

    Read more

  • Python is vs ==: Object identity and value equality

    Consider this Python: Surprised? That’s because “is” is the wrong comparison: • == asks: are these the same value?• is asks: are these the same object? You almost never care about question #2. And so, should rarely use “is”.

    Read more

  • Python numeric literals: Using underscores to group digits

    Want to make Python numbers more readable? Use _ between digits (not at the start or end):

    Read more

  • Reuven’s 2025 in review

    Can you believe that 2025 is almost over? It was full of big events for me, and yet it also whizzed past at breakneck speed. And so, before we start 2026, I want to share a whole bunch of updates on what I’ve done over the last 12 months — and where I plan to…

    Read more

  • 30 things I’ve learned from 30 years as a Python freelancer

    30 years! It’s hard to believe, but it was in December 1995 (i.e., 30 years ago) that I went freelance, giving up a stable corporate paycheck. And somehow, I’ve managed to make it work: During that time, I’ve gotten married, bought a house, raised three children, gone on numerous vacations, and generally enjoyed a good…

    Read more

  • Want to learn uv?

    You’ve probably heard about uv: But using uv isn’t just about learning a few commands. It’s about changing how you think about packaging, and what commands you run on a regular basis. That’s why I’ve created a free uv crash course. Every day, for 12 days, you’ll get insights into how to (and how not…

    Read more

  • Your personal mentor for Python and Pandas

    I’ve been teaching Python and Pandas for decades — in companies, at conferences, and on YouTube — and I keep hearing the same frustrations everywhere I go: That’s why I’ve spent the last few months completely rebuilding LernerPython.com. It’s a complete, structured learning experience, not just a set of courses. Instead of leaving you on…

    Read more

  • You’re probably using uv wrong

    Bottom line: If you’re typing uv pip install, you’re treating uv as a faster pip and missing the point. uv is built around projects: run uv init myproj to create a pyproject.toml, uv add to record dependencies, and uv run to execute your code. Do that, and you can ignore pip, venv, and pyenv entirely.…

    Read more

  • How to conference

    I love conferences. I enjoy everything about them — the nonstop stream of learning, the chance to see old friends and meet new ones, and just generally to be around a lot of interesting, smart, and fun people. And yes, as a trainer, I also enjoy getting a chance to teach — which is fun…

    Read more

  • My newest course: HOPPy (Hands-on Projects in Python)

    Congratulations! You’ve finished a Python course, or even two. You’re now a certified Python programmer. And yet, when it comes time to start a new Python project, you aren’t sure where to start. The blank screen in front of you doesn’t fill you with excitement and creativity. Rather, it fills you with self-doubt and dread.…

    Read more