from functools import reduce
def f(s): return int(s)
def g(x, y): y /= pow(10, len(str(y))) return x + y
anw = reduce(g, map(f, '123.4567676'.split('.'))) print(anw)
Sign in to make a reply
大冰小松
from functools import reduce
def f(s): return int(s)
def g(x, y): y /= pow(10, len(str(y))) return x + y
anw = reduce(g, map(f, '123.4567676'.split('.'))) print(anw)