DEV Community

Discussion on: Random Password generator - Easiest way { Python }

Collapse
 
lksmrqrdt profile image
Lukas Marquardt • Edited

Please do not use random.choice() for this kind of task.
This function doesn't generate cryptographically secure randomness and is not suited for this task.

The documentation mentions this:

Warning: The pseudo-random generators of this module should not be used for security purposes. For security or cryptographic uses, see the secrets module.