⬅ Previous TopicPython datetime Tutorial
Next Topic ⮕Python String Methods
Python Built-in Functions
Python comes with a set of built-in functions that help you perform basic to advanced operations without importing any external libraries. Below is a complete list of these functions arranged in alphabetical order.
Python Built-in Functions Table
| Function Name | Description |
|---|---|
| abs() | Returns the absolute value of a number. |
| aiter() | Returns an asynchronous iterator for an asynchronous iterable. |
| all() | Returns True if all elements of the iterable are true. |
| anext() | Retrieves the next item from an async iterator. |
| any() | Returns True if any element of the iterable is true. |
| ascii() | Returns a readable ASCII representation of an object. |
| bin() | Converts an integer to a binary string. |
| bool() | Converts a value to a Boolean (True or False). |
| breakpoint() | Drops you into the debugger at the call site. |
| bytearray() | Returns a new array of bytes. |
| bytes() | Returns a new bytes object. |
| callable() | Checks if the object appears callable (like functions). |
| chr() | Returns the string representing a character from a Unicode code. |
| classmethod() | Transforms a method into a class method. |
| compile() | Compiles source into a code object. |
| complex() | Creates a complex number. |
| delattr() | Deletes an attribute from an object. |
| dict() | Creates a new dictionary. |
| dir() | Returns the list of names in the current local scope. |
| divmod() | Returns the quotient and the remainder of a division. |
| enumerate() | Returns an enumerate object. |
| eval() | Evaluates a Python expression as a string. |
| exec() | Executes the dynamically created program. |
| filter() | Constructs an iterator from elements for which a function returns true. |
| float() | Converts a string or a number to a floating point number. |
| format() | Formats a value using a format specifier. |
| frozenset() | Returns an immutable frozenset object. |
| getattr() | Returns the value of a named attribute of an object. |
| globals() | Returns a dictionary representing the current global symbol table. |
| hasattr() | Checks if an object has a given attribute. |
| hash() | Returns the hash value of the object. |
| help() | Invokes the built-in help system. |
| hex() | Converts an integer to a hexadecimal string. |
| id() | Returns the identity of an object. |
| input() | Reads a line from input. |
| int() | Converts a string or number to an integer. |
| isinstance() | Checks if an object is an instance of a class. |
| issubclass() | Checks if a class is a subclass of another class. |
| iter() | Returns an iterator object. |
| len() | Returns the number of items in an object. |
| list() | Creates a list object. |
| locals() | Updates and returns a dictionary of the current local symbol table. |
| map() | Applies a function to all items in an input list. |
| max() | Returns the largest item in an iterable or arguments. |
| memoryview() | Returns a memory view object. |
| min() | Returns the smallest item in an iterable or arguments. |
| next() | Retrieves the next item from an iterator. |
| object() | Returns a new featureless object. |
| oct() | Converts an integer to an octal string. |
| open() | Opens a file and returns a corresponding file object. |
| ord() | Returns an integer representing the Unicode code of a character. |
| pow() | Returns base to the exponent power, optionally modulo. |
| print() | Prints to the standard output device. |
| property() | Returns a property attribute. |
| range() | Generates a sequence of numbers. |
| repr() | Returns a string representation of an object. |
| reversed() | Returns a reversed iterator. |
| round() | Rounds a number to a specified number of digits. |
| set() | Creates a new set object. |
| setattr() | Sets the value of an attribute of an object. |
| slice() | Creates a slice object. |
| sorted() | Returns a sorted list from the specified iterable. |
| staticmethod() | Transforms a method into a static method. |
| str() | Returns a string version of an object. |
| sum() | Sums the items of an iterable. |
| super() | Returns a proxy object that delegates method calls to a parent class. |
| tuple() | Creates a new tuple object. |
| type() | Returns the type of an object. |
| vars() | Returns the __dict__ attribute of an object. |
| zip() | Combines several iterables into tuples. |
| __import__() | Used by the import statement to import a module. |
How to Use This Table
Click on any function name to dive deeper into its usage, syntax, examples, and best practices.
Comments
Loading comments...