1.lambda()
匿名函数
2. map()
def map(function, sequence, *sequence_1): # real signature unknown; restored from __doc__ """ map(function, sequence[, sequence, ...]) -> list Return a list of the results of applying the function to the items of the argument sequence(s). If more than one sequence is given, the function is called with an argument list consisting of the corresponding item of each sequence, substituting None for missing values when not all sequences have the same length. If the function is None, return a list of the items of the sequence (or a list of tuples if more than one sequence). """ return [] # 两个参数,一个处理函数,一个可迭代的序列 # 返回一个列表
时间: 2024-10-12 13:06:24