# Revision history [back]

Here are two options:

sage: S.<X,Y> = FreeAlgebra(QQ)
sage: m = X*Y*X^2
sage: a.to_list()
[X, Y, X, X]


So if you have more than one term:

sage: m = X*Y*X**2 + 3*X**4*Y
sage: [a.to_list() for a in m.support()]
[[X, Y, X, X], [X, X, X, X, Y]]


You can also access raw exponent information:

sage: S.<X,Y> = FreeAlgebra(QQ)
sage: m = X*Y*X^2

Each entry in this list is of the form (gen, power), where gen=0 corresponds to X and gen=1 corresponds to Y.