Skip to content

Instantly share code, notes, and snippets.

@hendawy
Created September 15, 2016 08:29
Show Gist options
  • Save hendawy/66689ff782b8818287b136c107b7a7b3 to your computer and use it in GitHub Desktop.
Save hendawy/66689ff782b8818287b136c107b7a7b3 to your computer and use it in GitHub Desktop.
import uuid
o_u = uuid.uuid4()
u = str(o_u)
cf = u.split('-')
cf[-2] = cf[-2] + cf[-1]
cf.pop(-1)
cf = '-'.join(cf).upper()
h = o_u.hex
print(u)
print(cf)
print(h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment