[Tutor] Convert os.random output to a string

Ben Finney ben+python at benfinney.id.au
Fri Mar 7 00:41:56 CET 2014


Jay Lozier <jslozier at gmail.com> writes:

> I am try to generate random password strings of an arbitrary user
> selected length.

My first recommendation would be: Don't re-invent the wheel. Generating
password strings is a complex request, not because it's particularly
difficult but because the requirements are complex.

Research what other solutions have been published
<URL:https://duckduckgo.com/?q=generate+password+python> and see whether
you still need to write something different.

-- 
 \      “Any intelligent fool can make things bigger and more complex… |
  `\    It takes a touch of genius – and a lot of courage – to move in |
_o__)                        the opposite direction.” —Albert Einstein |
Ben Finney



More information about the Tutor mailing list