Hello, I hope it is okay to drop the snippet below. I saw that you were using a hex, from UUID. Basically, split at the dashes and join with empty string.
hex, from UUID
from uuid import uuid4 def remove_dashes(uid): return "".join(str(uid).split("-")) sample_uid = uuid4() sample_output = remove_dashes(sample_uid) print(str(sample_uid), sample_output, sep="\n") # 52af7d72-3b7c-4048-b3b9-28dff0c8308d # 52af7d723b7c4048b3b928dff0c8308d
Seems cool; vanilla python -w/o any lib.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello, I hope it is okay to drop the snippet below. I saw that you were using a
hex, from UUID
. Basically, split at the dashes and join with empty string.Seems cool; vanilla python -w/o any lib.