21day
Built-in functions:
1. ABS () absolute value function
2, Dict () Create a dictionary
3. Help () Get assistance information
4, Min () remove the smallest number from a list
5, Max () remove the maximum from a list
6, BOOL () Boolean type judgment
7, All () returns False when there is one in the data that is not true
Note: Also returns True when a recyclable data type is empty
8, any () returns True when there is one in the data set that is true. Returns false only if all data is false
9. Dir () prints all the variables that exist in the current program
10, Hex () returns a number of 16, the OCT () returns a number of 8 binary, bin () returns a number of 2 binary
Ord () returns the position of the string in the Acsii table, and Chr () returns the string that the position in the Acsii table refers to
11, Slice () to define the rules of the slice in advance, convenient to call
12, Divmod () returns the modulo that is divisible, and then returns the remainder.
Equivalent to 10/3 return integer 3, remainder 1 (10//3,10%3)
13. ID () Query the memory address of a data type in memory
14. Sorted () Sort the list in the way you want it
14, Enumerate () enumeration returns the index of the list
15. Eval (), exec () converts a string into code according to the rules of the interpreter
Note:
A, eval () can only execute a single line of code. EXEC () can execute multiple lines of code
b, EXEC () No return value, eval () has return value
16, sum () sum
Python Beginner 21st Day Function (4)-built-in function