- ABS (val) >>> absolute value of Val
- All (iterable) >>> returns True if all of the elements in the object can be iterated, and false is returned by no
- Any (iterable) >>> returns True if there is an element in an iterator object that is true, if it returns false otherwise
- ASCII (object) >>> convert a printable object to a string (rarely used)
- Bin (x) >>> Convert an integer x into binary
- BOOL ([x]) >>> convert list, number to bool value
- Bytes (str,encoding) >>> converts a string to binary, and the element cannot be modified
- ByteArray (str,encoding) >>> converts a string into a byte array, and can modify the element
- Callable (f) >>> determine if f can be called (F can be appended with parentheses, which can be called)
- Chr (i) >>> converts the number I to the character corresponding to the ASCII code
- Ord (c) >>> converts the character C to the encoding corresponding to the ASCII code
- Compile (STR1,STR2,STR3) >>> compiles the code in the string str1 with the execution specified in the string STR3, and saves the error message in str2 specified file if there is an error example: c= compile (Code, " Err.log "," exec ") if you want to perform a compile return result on exec (c)
- EXEC >>> Converts a string expression into code and executes the code
- Dir (c) >>> View all methods in Type C
- Divmod (A, B) >>> returns the quotient and remainder of A/b as tuples
- Enumerate () >>> convert list to enum type (see above for details)
- eval (expression) >>> convert string expression to code
- Filter (function,iterable) >>> filters out the data in iterable in the logic of the function and returns it as an iterator (for loop output) For example: res = filter (lambda-n >5,range (Ten)) >>>6~9
- Map (function,iterable) >>> operations with the logical iterable of a function and returns an iterator to the result for example: res = map (lambda n:n*n,range) > >>0,1,4,9,..., 81 equivalent to [N*n for N in range (10)]
- Format (*args,*kwargs) >>> replace placeholders (for example {0}, {1}) in the string with parameters in format (same as the format method in str type)
- Frozenset ([item1,item2,....]) >>> Make a collection immutable
- Globals () >>> returns all global variables under the current file
- Hash (str) >>> convert str string to corresponding hash value
- Hex (n) >>> convert a number to hexadecimal
- Locals () >>> returns the local variable in the child statement block where the method resides
- Max (iterable) >>> returns the maximum value in iterable
- Min (iterable) >>> returns the minimum value in iterable
- Oct (x) >>> convert number x to octal
- Pow (b) >>> returns the B-side of a
- Reversed (seq) >>> Reverse
- Round (f) >>> floating-point number f reserved two decimal places
- Slice (start,stop) >>> slice equivalent with [start,stop]
- Sorted (Iterable[,function,key]) >>> sort an iterative object with a logical function for example: a = {6:2,8:0,1:4,5:6} sorted (A.items,key = Lambda X:x[1]) >>> sort dictionaries in order of dictionary values
- SUM (iterable) >>> sum the list, etc.
- Zip (A, b) >>> A/b for one by one stitching
- __import__ (str) >>> import module with STR as module name
Python path-built-in functions