Skip to content

Instantly share code, notes, and snippets.

@bergantine
Last active May 18, 2021 07:13
Show Gist options
  • Save bergantine/9732714 to your computer and use it in GitHub Desktop.
Save bergantine/9732714 to your computer and use it in GitHub Desktop.
Safari-style #python #password Generator
from random import choice
def genCode(len):
return ''.join([choice('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') for i in range(len)])
print '%s-%s-%s-%s' % (genCode(3), genCode(3), genCode(3), genCode(3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment