What does ... mean in python?

What's ... or Ellipsis?

... or Ellipsis is a built-in constant.

In [1]: ... is Ellipsis
Out[1]: True

In [2]: 'Ellipsis' in dir(__builtins__)
Out[2]: True

... as a placeholder

Probably the most common usage for ... is as a placeholder for functions, similar to how pass is used.

def does_nothing():
    pass

def does_nothing2():
    3 # random constant used as a placeholder

def does_nothing3():
    # Similar to the previous example, but instead of using
    # an integer constant as a placeholder we use `...`
    ...

It can also be used as a placeholder in other situations, like class definitions:

class ToDo:
    ...

It is also used as a sentinel value in an argument list, similar to how None is used.

def foo(param=None)
    if param is None:
        param = 8 # assigns some default value
    ...

def foo2(param=...):
    if param is ...:
        param = 8 # assigns some default value

... in type hinting

... has also special meanings in type hinting:

References: