Skip to content

Instantly share code, notes, and snippets.

@pandeybk
Forked from henkjanverkerk/password.py
Created April 5, 2016 20:26
Show Gist options
  • Save pandeybk/42932c5878c456b7e6ec9f29e43078aa to your computer and use it in GitHub Desktop.
Save pandeybk/42932c5878c456b7e6ec9f29e43078aa to your computer and use it in GitHub Desktop.
Simple password generator
import random
def main():
length = int(raw_input('How long should your password be?\n'))
print("Here's the password I generated: " + "".join(random.sample('QWERTYUIOPASDFGHJKLZXCVBNM1234567890abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+', length)))
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment