def sub(x, y):
    """Subtracts two vectors x and y.

    Args:
        x: The minuend.
        y: The subtrahend.

    Returns:
        The result is the vector z for which z_i = x_i - y_i holds.
    """
    result = []
    for i, x_i in enumerate(x):
        result.append(x_i - y[i])
    return result