第一题
def normalize(name): return name.title()
第二题
def prod(L): return reduce(lambda x, y: x * y, L)
第三题
def str2float(s): dot = len(s) - s.index('.') s = s.replace('.', '') return reduce(lambda x, y: x * 10 + y, map(lambda x: int(x), s)) / (10 ** (dot - 1))
Sign in to make a reply
胆小的魔术师
第一题
第二题
第三题