def dup_nth(f, n, K):
 if (n < 0):
  raise IndexError(("'n' must be non-negative, got %i" % n))
 elif (n >= len(f)):
  return K.zero
 else:
  return f[(dup_degree(f) - n)]

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