samedi 22 janvier 2022

Why am I getting an overflowerror in Python?

here's my code

J = random.randrange(400000000000000000, 800000000000000000)
K = codecs.encode(J.to_bytes(2, 'big'), "base64")

but i'm getting an overflow error when trying to run this... Basically I'm generating a number between 400000000000000000 and 800000000000000000 and converting it to base64. If anyone could help, that'd be great, thanks




Aucun commentaire:

Enregistrer un commentaire