def simple_moving_average(iterable, k=10):
    """Returns an iterator over the simple moving average of the given list of
    values."""
    a = iterable if isinstance(iterable, list) else list(iterable)
    for m in range(len(a)):
        i = m - k
        j = m + k + 1
        w = a[max(0, i):j]
        yield float(sum(w)) / (len(w) or 1)
