def mean_squared_error(y_true,y_pred):
    """Calculate the MSE between a list of y values and predictions."""
    assert len(y_true)==len(y_pred)
    return sum([(true-pred)**2 for true,pred in zip(y_true,y_pred)]) / len(y_true)