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. |
- Previous
- Next
Python abs() built-in function
Python aiter() built-in function
Python all() built-in function
Python any() built-in function
Python ascii() built-in function
Python bin() built-in function
Python bool() built-in function
Python breakpoint() built-in function
Python bytearray() built-in function
Python bytes() built-in function
Python callable() built-in function
Python chr() built-in function
Python classmethod() built-in function
Python compile() built-in function
Python complex() built-in function
Python delattr() built-in function
Python dict() built-in function
Python dir() built-in function
Python divmod() built-in function
Python enumerate() built-in function
Python eval() built-in function
Python exec() built-in function
Python filter() built-in function
Python float() built-in function
Python format() built-in function
Python frozenset() built-in function
Python getattr() built-in function
Python globals() built-in function
Python hasattr() built-in function
Python hash() built-in function
Python help() built-in function
Python hex() built-in function
Python id() built-in function
Python __import__() built-in function
Python input() built-in function
Python int() built-in function
Python isinstance() built-in function
Python issubclass() built-in function
Python iter() built-in function
Python len() built-in function
Python list() built-in function
Python locals() built-in function
Python map() built-in function
Python max() built-in function
Python memoryview() built-in function
Python min() built-in function
Python next() built-in function
Python object() built-in function
Python oct() built-in function
Python open() built-in function
Python ord() built-in function
Python pow() built-in function
Python print() built-in function
Python property() built-in function
Python range() built-in function
Python repr() built-in function
Python reversed() built-in function
Python round() built-in function
Python set() built-in function
Python setattr() built-in function
Python slice() built-in function
Python sorted() built-in function
Python staticmethod() built-in function
Python str() built-in function
Python sum() built-in function
Python super() built-in function
Python tuple() built-in function
Python type() built-in function
Python vars() built-in function
Python zip() built-in function
Python Args and Kwargs
Python Basics
Python built-in functions
Python Comprehensions
Python Context Manager
Python Control Flow
Python Dataclasses
Python Debugging
Python Dictionaries
Python Exception Handling
File and directory Paths
Python Functions
Python Json and YAML
Python Lists and Tuples
Python Main function
Manipulating strings
Python OOP Basics
Reading and writing files
Python Regular Expressions
Python Sets
Python Setup.py
Python String Formatting
Python Virtual environments