def dmp_nth(f, n, u, K):
 if (n < 0):
  raise IndexError(("'n' must be non-negative, got %i" % n))
 elif (n >= len(f)):
  return dmp_zero((u - 1))
 else:
  return f[(dmp_degree(f, u) - n)]

def dmp_nth ( f , n , u , K ) : if ( n < 0 ) : raise IndexError ( ( "'n' must be non-negative, got %i" % n ) ) elif ( n >= len ( f ) ) : return dmp_zero ( ( u - 1 ) ) else : return f [ ( dmp_degree ( f , u ) - n ) ]
return the n-th coefficient of f in k[x] .