TechToFreedom
Published in

TechToFreedom

3 Uses of the Ellipsis in Python

The cutest syntax sugar in Python

3 Uses of the Ellipsis in Python
Photo by Mike Szczepanski on Unsplash

Python has a special built-in singleton object called “Ellipsis”. If we input three dots or the word “Ellipsis” in a Python interactive shell, the results are as following:

>>> ...
Ellipsis
>>> Ellipsis
Ellipsis

This simple object seems inconspicuous, but if we use it properly, it can make our lives…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yang Zhou

Yang Zhou

Senior Full-Stack Engineer | Top Writer | Join me in Medium: https://yangzhou1993.medium.com/membership