Python – How to convert a Python UUID into a string

python, string, uuid

I need to
be able to assign a UUID to a user and document this in a .txt file. This is all I have:

import uuida = input("What's your name?")print(uuid.uuid1())

I tried:


but nothing comes up, may be a logical error but I don't know.

Best Solution

you can try this !

 a = uuid.uuid1() str(a) --> '448096f0-12b4-11e6-88f1-180373e5e84a'