def mean(iterable):
    """x can be any iterable"""
    iterator = iter(iterable)
    value = next(iterator)
    num = 1
    for element in iterator:
        num += 1
        value = value + element
    return value / num
