def sdm_strip(f):
 return [(monom, coeff) for (monom, coeff) in f if coeff]

def sdm_strip ( f ) : return [ ( monom , coeff ) for ( monom , coeff ) in f if coeff ]
remove terms with zero coefficients from f in k[x] .