Python built-in functions
The Python interpreter has a number of functions and types built into it that are always available.
Python built-in Functions
Function | Description |
---|---|
Return the absolute value of a number. | |
Return an asynchronous iterator for an asynchronous iterable. | |
Return True if all elements of the iterable are true. | |
Return True if any element of the iterable is true. | |
Return a string with a printable representation of an object. | |
Convert an integer number to a binary string. | |
Return a Boolean value. | |
Drops you into the debugger at the call site. | |
Return a new array of bytes. | |
Return a new “bytes” object. | |
Return True if the object argument is callable, False if not. | |
Return the string representing a character. | |
Transform a method into a class method. | |
Compile the source into a code or AST object. | |
Return a complex number with the value real + imag*1j. | |
Deletes the named attribute, provided the object allows it. | |
Create a new dictionary. | |
Return the list of names in the current local scope. | |
Return a pair of numbers consisting of their quotient and remainder. | |
Return an enumerate object. | |
Evaluates and executes an expression. | |
This function supports dynamic execution of Python code. | |
Construct an iterator from an iterable and returns true. | |
Return a floating point number from a number or string. | |
Convert a value to a “formatted” representation. | |
Return a new frozenset object. | |
Return the value of the named attribute of object. | |
Return the dictionary implementing the current module namespace. | |
True if the string is the name of one of the object’s attributes. | |
Return the hash value of the object. | |
Invoke the built-in help system. | |
Convert an integer number to a lowercase hexadecimal string. | |
Return the “identity” of an object. | |
This function takes an input and converts it into a string. | |
Return an integer object constructed from a number or string. | |
Return True if the object argument is an instance of an object. | |
Return True if class is a subclass of classinfo. | |
Return an iterator object. | |
Return the length (the number of items) of an object. | |
Rather than being a function, list is a mutable sequence type. | |
Update and return a dictionary with the current local symbol table. | |
Return an iterator that applies function to every item of iterable. | |
Return the largest item in an iterable. | |
Return the smallest item in an iterable. | |
Retrieve the next item from the iterator. | |
Return a new featureless object. | |
Convert an integer number to an octal string. | |
Open file and return a corresponding file object. | |
Return an integer representing the Unicode code point of a character. | |
Return base to the power exp. | |
Print objects to the text stream file. | |
Return a property attribute. | |
Return a string containing a printable representation of an object. | |
Return a reverse iterator. | |
Return number rounded to ndigits precision after the decimal point. | |
Return a new set object. | |
This is the counterpart of getattr(). | |
Return a sliced object representing a set of indices. | |
Return a new sorted list from the items in iterable. | |
Transform a method into a static method. | |
Return a str version of object. | |
Sums start and the items of an iterable. | |
Return a proxy object that delegates method calls to a parent or sibling. | |
Rather than being a function, is actually an immutable sequence type. | |
Return the type of an object. | |
Return the dict attribute for any other object with a dict attribute. | |
Iterate over several iterables in parallel. | |
This function is invoked by the import statement. |