30 Python Language Tricks That Will Make You a Better Coder

If you think you mastered the language, you’ve got to read this

Erik van Baaren
Python Land

--

Image by author

There are lots of little tricks that can make life easier for a Python coder. Some of these will be known to you, but I’m sure there are at least a couple that you haven’t seen before.

If you’re done reading, also take a look at our latest article on concurrency:

1. The Python Ellipsis

The Python ellipsis is a sequence of three dots. It’s used a lot in conventional (non-programming) languages. But what you might not know, is that it’s a valid object in Python too:

>>> ...
Ellipsis

Its primary use seems to be in matrix slicing operations in NumPy. However, you can use it as a placeholder in a function that you haven’t implemented yet, instead of using pass, as most people…

--

--