def sub(vector1, vector2):
    """
    Subtracts a vector from a vector and returns the result as a new vector.
    :param vector1: vector
    :param vector2: vector
    :return: vector
    """
    new_vector = []
    for index, item in enumerate(vector1):
        new_vector.append(vector1[index] - vector2[index])
    return new_vector