You could store the list by writing to a file directly in Python or alternatively you could transform the list to a numpy array or PyTorch tensor and use their save methods. There are a lot of options how to store a list and the best approach depends on your actual use case.
I’m not sure, if you can pass the list directly to your DataLoader. The usual work flow is to create a Dataset and pass it to the DataLoader.
Have a look at the data loading tutorial 175 for more information.