Where to start


Joined
Nov 4, 2021
Messages
1
Reaction score
0
So im trying to make a program that generates a random string of numbers and letters. Then stores them under a certain name, and can then retrieve them. The problem is, I need it to work on both Linux and Windows. Any help here?
 
Ad

Advertisements

Joined
Mar 3, 2021
Messages
65
Reaction score
12
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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top