def dmp_strip(f, u):
 if (not u):
  return dup_strip(f)
 if dmp_zero_p(f, u):
  return f
 (i, v) = (0, (u - 1))
 for c in f:
  if (not dmp_zero_p(c, v)):
   break
  else:
   i += 1
 if (i == len(f)):
  return dmp_zero(u)
 else:
  return f[i:]

def dmp_strip ( f , u ) : if ( not u ) : return dup_strip ( f ) if dmp_zero_p ( f , u ) : return f ( i , v ) = ( 0 , ( u - 1 ) ) for c in f : if ( not dmp_zero_p ( c , v ) ) : break else : i += 1 if ( i == len ( f ) ) : return dmp_zero ( u ) else : return f [ i : ]
remove leading zeros from f in k[x] .