So to make objects persistent, one module you could use would be the pickle module.
One example would be:
import pickle
RandomList = []
with open('randomlist_persistence', 'wb') as outp:
pickle.dump(RandomList, outp)
This would save the RandomList list object to a file. To then access it again, you can use:
with open('randomlist_persistence', 'rb') as inp:
RandomList = pickle.load(inp)
Bear in mind, opening the file in write-mode will overwrite the list, so if you want to ammend a list, ensure you open the file in read mode first, save the list to a variable and then open it again it write-mode and re-write it.
I.e.
with open('randomlist_persistence', 'rb') as inp:
RandomList = pickle.load(inp)
...... do any modifications here ......
with open('randomlist_persistence', 'wb') as outp:
pickle.dump(RandomList, outp)
Hopefully this helps. More information on the pickle module can be found here:
https://docs.python.org/3/library/pickle.html?highlight=pickle#module-pickle