| 1 | initial version |
If all you care about is the string you can do str(p).replace('x','n').
sage: R.<x> = ZZ[]
sage: p = 16*x^5 - 20*x^3 + 5*x
sage: p
16*x^5 - 20*x^3 + 5*x
sage: str(p).replace('x','n')
'16*n^5 - 20*n^3 + 5*n'
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.