def difference(data, interval):
    """ difference dataset
    
    parameters:
        data: dataset to be differenced
        interval: the interval between the two elements to be differenced. 
        
    return: 
        dataset: with the length = len(data) - interval
        
    """
    return [data[i] - data[i - interval] for i in range(interval, len(data))]