I\'dl like to generate some alphanumeric passwords in python. Some possible ways are:
import string from random import sample, choice chars = string.letters
Here in the line 9 of above coding:
return (choice(options) for _ in xrange(length))
Actually the xrange is not defined, so the correct coding for this is:
xrange
return (choice(options) for _ in range(length))
Same in 76 line too.