English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Python has ready-to-use functions. These functions are called built-in functions. You will find all built-in functions in Python on this reference page.
Function | Description |
---|---|
abs() | Returns the absolute value of a number |
all() | Returns True if all items in the iterable are true. |
any() | Returns True if any item in the iterable is true. |
ascii() | Returns a readable version of the object. Replaces 'none' with escape characters-ASCII character. |
bin() | 返回数的二进制版本。 |
bool() | 返回指定对象的布尔值。 |
Return the binary version of the number. | bool() |
Return the boolean value of the specified object. | bytearray() |
Return a byte array. | bytes() |
Return a byte object. | callable() |
If the specified object is callable, return True, otherwise return False. | chr() |
Return the character in the specified Unicode code. | classmethod() |
Convert a method to a class method. | compile() |
Take the specified source as an object and prepare it for execution. | complex() |
Return a complex number. | delattr() |
Delete the specified attribute (attribute or method) from the specified object. | dict() |
Return a dictionary (array). | dir()1Return the list of attributes and methods of the specified object.2divmod() |
When dividing by the parameter | enumerate() |
Get a set (such as a tuple) and return it as an enumeration object. | eval() |
Evaluate and execute the expression. | exec() |
Execute the specified code (or object). | filter() |
Use a filter function to exclude items from an iterable object. | float() |
Return a floating-point number. | format() |
Format the specified value. | frozenset() |
Return a frozenset object. | getattr() |
Return the value of the specified attribute (attribute or method). | globals() |
Return the current global symbol table as a dictionary. | hasattr()/If the specified object has the specified attribute (attribute) |
hash() | Return the hash value of the specified object. |
help() | Execute the built-in help system. |
hex() | Convert the number to a hexadecimal value. |
id() | Return the id of the object. |
input() | Allow the user to input. |
int() | Return an integer. |
isinstance() | Return True if the specified object is an instance of the specified object. |
issubclass() | Return True if the specified class is a subclass of the specified object. |
iter() | Return an iterator object. |
len() | Return the length of the object. |
list() | Return a list. |
locals() | Return the updated dictionary of the current local symbol table. |
map() | Return the specified iterator, where the specified function is applied to each item. |
max() | Return the largest item from an iterable object. |
memoryview() | Return a memory view (memory view) object. |
min() | Return the smallest item from an iterable object. |
next() | Returns the next item in an iterable object. |
object() | Returns a new object. |
oct() | Converts a number to an octal. |
open() | Opens a file and returns a file object. |
ord() | Converts an integer to an octal. |
pow() | Returns the value of x raised to the power of y. |
print() | Prints to the standard output device. |
property() | Get, set, and delete attributes. |
range() | Returns a number sequence, starting from 0 and ending with 1 For increment (usually). |
repr() | Returns a readable version of the object. |
reversed() | Returns an iterator that is reversed. |
round() | Rounds the logarithm. |
set() | Returns a new set object. |
setattr() | Sets the attribute of the object (attribute/method). |
slice() | Returns a slice object. |
sorted() | Returns a sorted list. |
staticmethod() | Converts a method to a static method. |
str() | Returns a string object. |
sum() | Sums the items of an iterator. |
super() | Returns an object representing the superclass. |
tuple() | Returns a tuple. |
type() | Returns the type of the object. |
vars() | Returns the __dict__ attribute of the object. |
zip() | Returns an iterator from two or more iterators. |