Skip to content

Instantly share code, notes, and snippets.

@eloyz
Last active September 27, 2015 07:27
Show Gist options
  • Save eloyz/1232990 to your computer and use it in GitHub Desktop.
Save eloyz/1232990 to your computer and use it in GitHub Desktop.
Password Generator (with human friendly characters)
def password_generator(length=8):
from random import choice
from string import letters, digits
doppelgangers = set('io10szSZOIl25uvUV')
alphanums = set(letters+digits)
chars = list(doppelgangers - alphanums)
return ''.join([choice(chars) for i in range(length)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment