Sorry for the very late reply. Are you still working on this? Does it need to store them permanently, on disk, and be able to retrieve them next time you run the program? Or is it sufficient to store and retrieve them just during the running of the script? If it's the latter, just use a
dictionary to store the numbers and the
random library to generate them. If it's the former, you'll need to write the number to a file, in which case I'd take the "certain name" and run it through a hashing algorithm to get a safe, calculable file name (which comes with the very, very low risk of a hash collision).