Built-in Functions

Built-in Functions

The Python interpreter has a set of functions and types built into it (pre-defined). They are always ready at your disposal; you can use them without needing to import a library.

There are 68 built-in functions and they are listed here in alphabetical order.

Built-in Functions

Takes in a numeric data type such as int or float and returns the absolute value of the argument.
Returns True if every item in an iterable evaluates to True, otherwise, it returns False.
Takes in an iterable object such as a list or tuple and returns True if any of the elements in the iterable are True. If none of the elements in the iterable are True, returns False.
Receives as input an object containing string data, and returns the object as a printable representation with escapes for non-ASCII characters (accented characters).
Converts an integer into its binary equivalent string.
Converts a value to a Boolean True or False value.
Engage, configure, and change the debugger program used in a script.
Returns an array of the given bytes of an object.
Returns a byte immutable object representing the given bytes of an object.
Returns True if an object is callable, and False if an object is not callable.
Returns Unicode characters represented by integers ranging between 0 and 1,114,111.
Converts a given function into a class method.
Returns a runnable code object created from a string.
Converts a given string into a complex number.
Allows the user to delete attributes from an object.
Initializes a new dictionary from mapping n-number of object (key, value) pairs.
Takes in a numeric, string, or no value and a copy of that value in the floating point data type.
Takes in a value from the user and converts the value into a string.
Takes in a value that can be converted into an integer, and returns a copy of the value in the int datatype.
Returns the highest value from values given or an iterable.
Returns the lowest value from values given or an iterable.
Returns the value of a base number x to the power of an exponent y, with an optional modulus z.
Takes in an iterator object, such as a list or string, and returns a reversed iterator object.
Takes a number and an integer as parameters, and returns the number with decimal places equal to the integer.
Takes in an iterator object, such as a list, tuple, dictionary, set, or string, and sorts it according to a parameter.
Takes multiple iterators as input and returns a single zip object made up of a list of tuples.
Interested in contributing to Codecademy Docs? Check out our Contribution Guide or leave us some feedback.

Learn Python on Codecademy