How to get unsigned and signed integers in Python using UUID

Viewed 14

I came across a stack overflow question and I saw a way to generate 64 bit integers in Python using the UUID module

from uuid import uuid1
uuid1().int >> 64
# expected output “A 64 bit unsigned integer”

So this is my question: How can one generate signed integers (maybe 8bit, 16bit, 32bit, 64bit or 128bit) in place of unsigned integers.

Please forgive my ignorance

0 Answers
Related