mardi 6 décembre 2016

How to use Python `secret` module to generate random integer?

In Python 3.6, new module, secrets, was added.

What is the most efficient way to generate random integer in range [n, m) using this module?

I tried choice(range(n, m)), but I doubt it is the best way.




Aucun commentaire:

Enregistrer un commentaire