When I look at my blog, I choose to die.
Divmod (A, b) #返回a//b values and remainder
s = divmod (97,10)
Print (s)
N1, N2 = Divmod (89,5)
Print (N1,N2)
Isinstance () #判断对象是否是某个类的实例 filter (function, iteration object)
Li = [11,22,33,44,55]
RET = filter (lambda a:a>30,li) #筛选, loop through the second argument, let each element execute the function, if the function value returns True, indicates that the element satisfies the filter condition.
Map (function, iterative object)
L1 = map (lambda a:a+100,li) #将函数的返回值添加到结果中
Print (list (L1))
Note: Filter adds an element that satisfies a condition to the result when the function execution result is true.
map is to add the result of the function's execution (the return value) to the result.
Global () Globals () local variable hash () hash table bytes () converts characters to bytes
Python built-in functions 2