Blog

  • Seven ways to improve your team’s Python

    If you’re a manager, then you’re always trying to find ways that’ll help your team do more in less time. That’s why you use Python — because it makes your developers more productive. They can spend more time creating new features, and less time debugging or maintaining existing code. It’s no surprise that so many…

    Read more

  • Registration for Weekly Python Exercise ends in 24 hours

    Registration for Weekly Python Exercise B1 (i.e., advanced level, part 1) closes in about 24 hours. Don’t be left out! WPE gives you exercises in all sorts of advanced Python topics: Data structures, functions, object-oriented programming, comprehensions, generators, and decorators.    These exercises model real-world problems, so that when you encounter problems at your job, you’ll…

    Read more

  • Understanding Python slices

    Let’s say that you have a Python string, and want to grab a substring from it. The best way to do so is with a “slice”: >>> s = ‘abcdefghij’>>> print(s[3:8])defgh In the above code, we’ve defined a string. We’ve then asked for the string to be returned, starting at index 3 and up to…

    Read more

  • Want to improve your Python skills? Join the upcoming cohort of Weekly Python Exercise!

    For more than 20 years, I’ve been teaching Python courses to companies around the world. This means that just about every day, I’m on the front lines of Python learning.  I see, first-hand, what companies want people to learn and also what people are struggling to understand. The result is Weekly Python Exercise, my course…

    Read more

  • The “Train Better” podcast is live!

    I’m a professional trainer; just about every day, I’m in a different city, country, and/or company teaching Python, data science, and other topics. Over the last few years, I’ve also thought a lot about training as a specialty — and I write about it on my “Trainer Weekly” newsletter, as well as in a “Technical…

    Read more

  • Answering Python questions from readers

    Every so often, I’ve asked readers of my free, weekly “Better developers” newsletter to send me their Python problems. And every so often, I get a chance to answer their questions, going through their Python problems and trying to solve them. I’ve recently recorded and uploaded two videos with solutions to their problems, which I’m…

    Read more

  • Python’s str.isdigit vs. str.isnumeric

    Bottom line: str.isdigit returns True only for the digits 0-9 (plus superscripts like ‘\u00b2’), while str.isnumeric also returns True for numeric characters from other writing systems, such as the Chinese ‘\u4e00\u4e8c\u4e09’. A third method, str.isdecimal, is the strictest of the three. If you plan to pass the string to int(), use isdigit \u2014 int(‘\u4e8c’) raises…

    Read more

  • Beyond the “hello, world” of Python’s “print” function

    One of the first things that anyone learns in Python is (of course) how to print the string, “Hello, world.”  As you would expect, the code is straightforward and simple: print(‘Hello, world’) And indeed, Python’s “print” function is so easy and straightforward to use that we barely give it any thought.  We assume that people…

    Read more

  • Registration ends today for Weekly Python Exercise

    If you want to join this month’s cohort of Weekly Python Exercise, you’d better act fast: Registration ends today! If you feel stuck after having taken a Python course or read a book, and don’t know how to improve, If you want to get real-world practice problems that’ll help you with your career, If you…

    Read more

  • Reminder: Weekly Python Exercise registration ends soon

    If you want to improve your understanding of Python, then you’re going to have to practice. And as hundreds of developers from around the world have already learned, there’s no better way to practice than Weekly Python Exercise. If you’re relatively new to Python, this our upcoming cohort is for you! Weekly Python Exercise: Newbie…

    Read more