Let’s say that we create a new, empty Python dictionary: >>> d = {} How much memory does this new, empty dict consume? We can find out with “sys.getsizeof“: >>> import sys>>> sys.getsizeof(d)240 In other words, our dictionary, with nothing in it at all, consumes 240 bytes. Not bad; given ...

Read More

If you’ve just finished a Python course or book, then you might feel a bit nervous about your Python knowledge. You might be wondering how you can become a master Python developer, solving problems without turning to Stack Overflow every few minutes. The good news is that you can improve! ...

Read More

I was delighted to appear on the popular “Talk Python to Me” podcast, run by Michael Kennedy. In the podcast, I talk about teaching, learning, and teaching Python to companies. If you’re interested in how to learn better or teach better, then I think you’ll enjoy this episode! The episode ...

Read More