def range(start, stop):
    """
    range(start, stop) -> list object

    Return an list that is a a sequence of integers from start (inclusive)
    to stop (exclusive).  range(i, j) produces i, i+1, i+2, ..., j-1.
    """
    length = stop - start
    out = list(length=length)
    index = 0
    orig_start = start
    while start < stop:
        val = index + orig_start
        out[index] = val
        index = index + 1
        start = orig_start + index
    return out
