a = s.split('.') c = list(map(int, a[1])) c.reverse() c.append(0) e = reduce(lambda x, y: x*0.1+y, c) return int(a[0])+e
Sign in to make a reply
为什么猫不吃鱼