In English writing, you can use the ellipsis to indicate that you’re leaving something out.
Essentially, you use three dots (...) to replace the content.
But the ellipsis doesn’t only exist in prose—you may have seen three dots in Python source code, too.
The ellipsis literal (...) evaluates to Python’s Ellipsis.
Because Ellipsis is a built-in constant,
you can use Ellipsis or ... without importing it:
Language: Python
>>> ...
Ellipsis
>>> Ellipsis
Ellipsis
>>> ... is Ellipsis
True
Although three dots may look odd as Python syntax, there are situations where using ... can come in handy.
But when should you use Ellipsis in Python?
Source Code: Click here to download the free source code that you’ll use to master the ellipsis literal.