Popular recipes by Patrick Ramsey http://code.activestate.com/recipes/users/4169944/2009-04-21T18:56:01-07:00ActiveState Code Recipespseudo-random string (Python)
2009-04-21T18:56:01-07:00Patrick Ramseyhttp://code.activestate.com/recipes/users/4169944/http://code.activestate.com/recipes/576722-pseudo-random-string/
<p style="color: grey">
Python
recipe 576722
by <a href="/recipes/users/4169944/">Patrick Ramsey</a>
(<a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/random/">random</a>, <a href="/recipes/tags/string/">string</a>).
Revision 3.
</p>
<p>Returns a random, password-suitable string with the specified number of characters.
base64 stores 6 bits in each (8-bit) output character, hence the coefficient.</p>