Complete Python Built-in Functions with Examples

What are built-in functions in Python?

Built-in functions are part of the Python programming language itself and provide essential functionality for various operations.

In Python, there are several built-in functions that are available for immediate use without the need for importing any external libraries.

How many built-in functions are in Python?

In the latest version of Python 3.10, there are 71 built-in functions in the standard library.

They’re used by programmers to perform common tasks such as mathematical calculations, data processing, string manipulation, file handling, etc.

List of All Built-in Functions in Python

Python functions are part of the standard library and are included by default when installing Python.

Let’s take a look at the list of Python built-in functions with examples.

1abs()This function returns the absolute value of the number. Arguments may be integers, floating-point numbers, or objects implementing __abs__().
2aiter()This function takes an asynchronous iterator and returns a synchronized iterable for use with that iterator.
3all()Returns True if each item in an iterable object is true and there are no false elements.
4any()Returns If even one of the items in an iterable object is true, then true is returned.
5anext()Return the next item in the asynchronous iterator that was given to you, or the default if the iterator does not contain any items.
6ascii()The readable version of an object is the one that is returned by this method. This command inserts an escape character in front of any characters that aren’t ASCII.
7bin()Provides a number in its binary representation and returns it.
8bool()This function returns either the true or false value of the object.
9breakpoint()When you use this function, the debugger will take you to the location of the call.
10bytearray()This function returns an array containing byte values.
11bytes()It returns an object of type bytes.
12callable()Returns If the object that was supplied can be called, then this value is True; otherwise, it will return False.
13chr()This function takes a Unicode code as an argument and returns a character that corresponds to that code.
14classmethod()Performs the transformation of a method into a class method.
15compile()Returns the source you specify as an object that is prepared to be carried out in the execution.
16complex()Provides a number with a complex value as its return value.
17delattr()Deletes the method or property specified from the object specified if it was specified.
18dict()This function returns a dictionary (Array)
19dir()This function will return a list of all the properties and methods that are associated with the object.
20divmod()When argument1 is divided by argument2, this function returns both the quotient and the remainder.
21enumerate()This function takes a collection and returns an enumerated object from the collection, similar to a tuple.
22eval()Performs an evaluation and then executes an expression.
23exec()It executes the code that you specified (or object)
24filter()To remove items from an iterable object, use a filter function.
25float()Return a Python floating point number built from the given number.
26format()A value that you specify is given a format.
27frozenset()Gives back an object with the name frozenset.
28getattr()The value of the attribute that was provided is returned by this function (property or method)
29globals()This function takes the current global symbol table and returns it as a dictionary.
30hasattr()Returns True if the given object has the given attribute, method, or property.
31hash()The value of the object’s hash that was supplied is returned.
32help()Functions to run the built-in help system.
33hex()Performs the conversion of an integer to its corresponding value in hexadecimal.
34id()This function gives back the object’s id.
35input()This function is accepting input from the user.
36int()Returns an integer number
37isinstance()Returns True if the object given is a copy of the object given.
38issubclass()Python issubclass() returns True if the class you choose is a subclass of the object you choose.
39iter()Returns an object with an iterator.
40len()Returns an object’s length.
41list()Returns a list
42locals()Returns the current local symbol table’s updated dictionary.
43map()Returns the iterator with the function you specified applied to each item.
44max()Returns the largest item in an iterable
45memoryview()Returns a view object from memory
46min()Returns the smallest item in an iterable
47next()Returns the next element in an iterable
48object()Returns a new object
49oct()Converts a number to an octal format.
50open()Numbers are rounded to the nearest integer.
51ord()Convert an integer that represents the Unicode of the given character to a string.
52pow()pow() function returns the value of x times the power of y
53print()Prints to the default printer.
54property()Gets, sets, deletes a property
55range()Returns a list of numbers, starting with 0 and going up by 1 each time (by default)
56repr()Returns a version of an object that can be read.
57reversed()Returns an iterator that goes in the opposite direction.
58round()Sort a list and returns it.
59set()Returns a new set object
60setattr()Sets an object’s attribute (property or method).
61slice()Returns a slice object
62sorted()Sorts a list and returns it.
63staticmethod()Makes a method a static method.
64str()Sort a list and return it.
65sum()Adds up all of the items in an iterator
66super()Returns an instance of the parent class.
67tuple()Returns a tuple
68type()Returns an object’s type.
69vars()Returns an object’s __dict__ property.
70zip()Returns an iterator, from two or more iterators
71__import__()Is a function that’s called by the import statement.
Complete Python Built-in Functions

All of these built-in functions come from the Python official documentation about Built-in Functions.


In summary, we’ve learned that the latest Python 3.10 has 71 built-in functions that come with it.

In this tutorial, we’ve talked about what built-in functions are and given a list of all the functions in Python, along with their syntax and some examples of how to use them.

Finally, check out our list of Python Tutorial Topics if you missed any of our previous lessons.

In the next post, Python Modules“, you’ll find out about the import statement, namespace and scooping, and packages. So go see it as soon as you can!

Leave a Comment