Discuss / Python / 请允许我偷懒 哈哈 交作业啦~

请允许我偷懒 哈哈 交作业啦~

Topic source

第一题: def normalize(name): return name.capitalize() L1 = ['adam', 'LISA', 'barT'] L2 = list(map(normalize,L1)) print (L2)

第二题

def prod(L): def mul(x , y): return x * return reduce(mul , L)

第三题实在思考不通~廖神好多东西都没有说清 比如...split..

偷懒的办法是...

直接return float(s)

哈哈


  • 1

Reply