def str2float(s): L = s.split(sep='.') num1 = reduce(lambda x, y: x * 10 + y, map(char2num, L[0])) num2 = reduce(lambda x, y: x * 0.1+ y, map(char2num, L[1][::-1])) return num1 + num2 * 0.1
Sign in to make a reply
丑得惊动中南海