第一题: # -- coding: utf-8 --
def normalize(name): name=name.title() return name
第二题: # -- coding: utf-8 --
def prod(L): if not isinstance(L,list): raise TypeError('bad operand type') def cj(x,y): return x*y return reduce(cj,L)
Sign in to make a reply
红莲爆雷刃
第一题: # -- coding: utf-8 --
def normalize(name): name=name.title() return name
第二题: # -- coding: utf-8 --
def prod(L): if not isinstance(L,list): raise TypeError('bad operand type') def cj(x,y): return x*y return reduce(cj,L)