This puts the expanded polynomial into the file tempput.
In[1]:=
Here are the contents of the file tempput.
In[2]:=