Working with Built-in Functions in Python

Claudio Sabato
5 min readJan 28, 2024

There are two main types of functions in Python:

  • Built-in functions: they are built-in in Python and hence they are available immediately in your Python installation. Some examples of Python built-in functions are input(), isinstance(), len(), list(), print(), sum(), zip().
  • User-defined functions: they are custom functions that users create to solve specific problems that are not solved by one of the many built-in functions.

In this tutorial, we will focus on Python built-in functions.

How Many Python Built-in Functions Are Available?

Python 3.12 has 71 built-in functions. This number might change in future versions of Python.

Here are common built-in functions and examples of code that show how you can use them.

Execute the following examples using your Python shell to practice writing code in Python.

abs(): calculate the absolute value of a number

The abs() function accepts a single argument, which can be an integer, a floating-point number, or a complex number, and returns the absolute value in the same data type for integers and floats, and the magnitude for complex numbers.

--

--

Claudio Sabato

Claudio Sabato is an IT expert with over 15 years of professional experience in Python/Bash programming, Linux Systems Administration and IT Systems Design.