I need to create a short unique ID which is a random sequence of numbers in python. So i need to allocate the short sequence to a user and also store it in a text file
Can some one please help me with this and give me an example??
I need to create a short unique ID which is a random sequence of numbers in python. So i need to allocate the short sequence to a user and also store it in a text file
Can some one please help me with this and give me an example??
Use uuid:
import uuid
uuid.uuid4()
results in things like:
UUID('35ad767c-da61-4731-adbc-cdd96efac2c4')
And a link to the python docs: https://docs.python.org/3.5/library/uuid.html