def cumsum(seq, start=0):
    """Returns the cumulative sum of the given elements.
    Uses ``+=`` to add, so you can even use lists.
    Adds to the given `start` value."""
    ret = []
    for n in seq:
        start += n
        ret.append(start)
    return ret