YUANya

导航

 
#!/usr/bin/python

a=set([i for i in range(4,8)])
b=set([i for i in range(5,12)])
c= sorted(a & b)
print c


print reduce(lambda x,y:(x-1)*y,c)

def func_1(x,y):
    return (x-1)*y
print reduce(func_1,c)

  

posted on 2019-07-11 16:05  YUANya  阅读(158)  评论(0编辑  收藏  举报