def mean(lis):
    lis_len = len(lis)
    if lis_len == 0:
        return 0.00 # Avoid ZeroDivisionError (not raised for floats anyway)
    total = float( sum(lis) )
    return total / lis_len
Always returns a floating-point number.
dataset/ETHPy150Open skyostil/tracy/src/generator/Cheetah/Tools/MondoReport.py/mean