def mean(data: Iterable[float]) -> float: 'Accurate arithmetic mean' data = list(data) return fsum(data) / len(data)