[Tutor] os.urandom()

bob gailer bgailer at gmail.com
Sun Aug 8 01:34:32 CEST 2010


On 8/7/2010 6:29 PM, Evert Rol wrote:
> [a for a in map(chr, os.urandom(6))]
>    

Overkill!

map(chr, os.urandom(6))

is sufficient.

Or

[chr(x) for x in os.urandom(6))]

The latter is easier to read.

-- 
Bob Gailer
919-636-4239
Chapel Hill NC



More information about the Tutor mailing list