Discuss / Python / 第三题 不引用自带函数:一行

第三题 不引用自带函数:一行

Topic source

Pmz丶

#1 Created at ... [Delete] [Delete and Lock User]

def str2float(s):

return  reduce(lambda x , y : 10 * x + y ,map(char2num,s.split('.')[0] + s.split('.')[1]))/10**len(s.split('.')[1])

  • 1

Reply