Overview image

The Python interpreter comes with some built-in functions that provide useful functionality. Some of the commonly used built-in functions include print(), input(), len(), etc.

These functions are a part of the Python language and do not need to be imported or installed.

As of Python 3.11.3 , the total built-in functions sums up to 68. These functions are as shown in the table below:

you can click on a function above to see its syntax, usage and other features.

Where are the functions defined?

The built-in functions in Python are implemented in Python and  partly in C. C is a lower-level language than Python, this allows Python to benefit from the speed and efficiency of C for performance-critical operations.

The builtins module in the standard library provides an interface to access the built-in functions. When you use a built-in function in your Python code, you are actually calling the corresponding function object from the builtins module.

import builtins

builtins.print('Hello, World')

You can use the builtin help() function to see more an each function such as usage and arguments.



For example:

//Help on built-in function print in module builtins:
//print(*args, sep=' ', end='\n', file=None, flush=False)
//    Prints the values to a stream, or to sys.stdout by default.
//    sep
//      string inserted between values, default a space.
//    end
//      string appended after the last value, default a newline.
//    file
//      a file-like object (stream); defaults to the current sys.stdout.
//    flush
//      whether to forcibly flush the stream.