Ask Your Question

Revision history [back]

polygens(QQ, 'x') returns a tuple consistantly with polygens(QQ, 'x, y') which also returns a tuple. If you want x to get the unique element of that tuple, not the tuple itself, you can do:

sage: x, = polygens(QQ, 'x')

or (equivalently):

sage: (x,) = polygens(QQ, 'x')