课上的练习

def res(i):
    return i % (3*5) == 0
list(filter(res,range(10,50)))
from functools import reduce
a =  list(filter(res,range(10,50)))
def num1(i,j):
    return i*100 + j
reduce(num1,a)

猜你喜欢

转载自www.cnblogs.com/banzui/p/9232982.html