You can use pickle library to do that.
First you need to create a empty list for storing results. Then you can append the needed infomation (epoch, loss , valid_loss) into that  list in each training loop. It will  be easy to append these information as a tuple in each iteration.
Then after training you can save this list to a file via pickle library. Which is a file you can load into python later,  as the saved list
As a example–>
import pickle as pkl

results = []
.
.
for e in range(epochs):
             .
             .
             .
             .
             results.append((epoch, loss.item(), valid_loss.item()
             .
             .

with open('results.pkl', 'wb') as f:       #this will save the list as "results.pkl" which you can load in later 
             pkl.dump(results, f)          #as a list to python  

Loading the saved list ---->
with open('results.pkl', 'rb') as f:
    results = pkl.load(f)

Hope this helps