<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def average(iterator):
 """Iterative mean."""

    count = 0
    total = 0
    for num in iterator:
        count += 1
        total += num
    return float(total)/count