Built in function bin(),oct(),hex() Used to convert integers to binary , Octal and hexadecimal forms , All three functions require that the argument must be an integer .
If necessary, calculate the average value of all elements in the list ,
sum()/len()
<>str
str() Directly convert any type of parameter to a string
<>min max
max() and min() of key Parameters can be used to specify comparison rules
<>sorted
sorted() Function pair list , tuple , Dictionaries , Collection or other iteratable object to sort and return a new list
<>reversed
reversed() Flip the iteratable object and return the iteratable object reversed object .
<>enumerate
Used to enumerate elements in an iteratable object , Return iteratable enumerate object , Each of these elements is a tuple containing an index and a value
<>map
map() Put a function func Map to each element of the sequence or iterator object in turn , And returns an iteratable map Object as a result
map Each element in the object is the function of the element in the original sequence func Results after treatment
<>discard
discard and remove:
discard No error will be reported when deleting non-existent elements , and remove() Method will cause an error when removing a non-existent element
Technology
Daily Recommendation