A Blog About Anime, Code, and Pr0 H4x

Password Generator in Two Lines

October 10, 2011 at 12:00 PM

The following piece of code was an experiment with lambda functions, and seeing how short I could make the code.

import random
          print "".join(map(chr,map(lambda x: random.randint(33,127),range(input('len: ')))))
          

Go to Page