Generate A UUID with .uuid4 in Python
September 2021
First off, standard UUIDs are 36 characters (32 hex characters plus four dashes)
From the docs: If all you want is a unique ID, you should probably call uuid1() or uuid4(). Note that uuid1() may compromise privacy since it creates a UUID containing the computer’s network address.
uuid4() creates a random UUID.
So,
=
Output:
4aa74f3e-c585-4103-881e-56a3e480d04e
Note that the value is a UUID object, but it converts to a string when printed. In this case, we're making the move explicitly.
end of line