import copy


def poly_diff(poly):  
    """ Differentiate a polynomial. """  
  
    newlist = copy.deepcopy(poly)  
  
    for term in newlist:  
        term[0] *= term[1]  
        term[1] -= 1  
  
    return newlist