def getitem(v, k):
    """
    Return the value of entry k in vector v.
    Entries start from zero

    >>> v = Vec([1,2,3,4])
    >>> v[2]
    3
    >>> v[0]
    1
    """
    assert k in range(v.size)
    return v.store[k]