我得答案
Topic source第三题结果: def str2float(s): L = s.split('.'); return reduce(lambda x,y : y+x10, map(int, L[0])) + reduce(lambda x,y : y+x10, map(int, L[1]))*pow(10, -len(L[1]))
- 1
第三题结果: def str2float(s): L = s.split('.'); return reduce(lambda x,y : y+x10, map(int, L[0])) + reduce(lambda x,y : y+x10, map(int, L[1]))*pow(10, -len(L[1]))
衣小袂对着树hole说
第一题: def normalize(s): return s[0].upper()+s[1:].lower() 第二题: def prod(L): return reduce(lambda x,y:xy,L) 第三题: def str2float(s): L=s.split('.'); return reduce(lambda x,y:y+x10,map(int,L[0]))+reduce(lambda x,y:y+x10,map(int,L[1]))/10*len(L[1])