Python解释器具有许多始终可用的功能。这些函数称为内置函数。例如,print()
函数将给定对象打印到标准输出设备(屏幕)或文本流文件。
在Python 3.6(最新版本)中,有68个内置函数。它们按字母顺序列在下面,并附有简要说明。
returns absolute value of a number | |
returns true when all elements in iterable is true | |
Checks if any Element of an Iterable is True | |
Returns String Containing Printable Representation | |
converts integer to binary string | |
Converts a Value to Boolean | |
returns array of given byte size | |
returns immutable bytes object | |
Checks if the Object is Callable | |
Returns a Character (a string) from an Integer | |
returns class method for given function | |
Returns a Python code object | |
Creates a Complex Number | |
Deletes Attribute From the Object | |
Creates a Dictionary | |
Tries to Return Attributes of Object | |
Returns a Tuple of Quotient and Remainder | |
Returns an Enumerate Object | |
Runs Python Code Within Program | |
Executes Dynamically Created Program | |
constructs iterator from elements which are true | |
returns floating point number from number, string | |
returns formatted representation of a value | |
returns immutable frozenset object | |
returns value of named attribute of an object | |
returns dictionary of current global symbol table | |
returns whether object has named attribute | |
returns hash value of an object | |
Invokes the built-in Help System | |
Converts to Integer to Hexadecimal | |
Returns Identify of an Object | |
reads and returns a line of string | |
returns integer from a number or string | |
Checks if a Object is an Instance of Class | |
Checks if a Object is Subclass of a Class | |
returns iterator for an object | |
Returns Length of an Object | |
creates list in Python | |
Returns dictionary of a current local symbol table | |
Applies Function and Returns a List | |
returns largest element | |
returns memory view of an argument | |
returns smallest element | |
Retrieves Next Element from Iterator | |
Creates a Featureless Object | |
converts integer to octal | |
Returns a File object | |
returns Unicode code point for Unicode character | |
returns x to the power of y | |
Prints the Given Object | |
returns a property attribute | |
return sequence of integers between start and stop | |
returns printable representation of an object | |
returns reversed iterator of a sequence | |
rounds a floating point number to ndigits places. | |
returns a Python set | |
sets value of an attribute of object | |
creates a slice object specified by range() | |
returns sorted list from a given iterable | |
creates static method from a function | |
returns informal representation of an object | |
Add items of an Iterable | |
Allow you to Refer Parent Class by super | |
Creates a Tuple | |
Returns Type of an Object | |
Returns __dict__ attribute of a class | |
Returns an Iterator of Tuples | |
Advanced Function Called by import |