第一个
L1 = ['aa','bbb'] L2 = list(map(lambda s: s.title(), L1)) print(L2) ['Aa', 'Bbb']
第二个:
def prod(L): return reduce(lambda x,y: x*y, L)
Sign in to make a reply
swunstudent
第一个
第二个: