from functools import reduce
tot = (1, 2), (3, 4), (1, 8)
reduce(lambda d, ((x0, y0), (x1, y1)): d + ((x1 - x0) ** 2 + (y1 - y0) ** 2
    ) ** 0.5, zip(tot[1:], tot[0:]), 0.0)
Python: reduce on tuple of tuples