from functools import reduce
def str2float(s): left,right=s.split('.') return reduce(lambda x,y:x*10+y,map(int,left))+ reduce(lambda x,y:x/10+y,map(int,right[::-1]))/10
Sign in to make a reply
坚强的布丁dns
from functools import reduce
def str2float(s): left,right=s.split('.') return reduce(lambda x,y:x*10+y,map(int,left))+ reduce(lambda x,y:x/10+y,map(int,right[::-1]))/10