Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 16, 2021 11:42
Show Gist options
  • Save amankharwal/7dbe5bd21faadf9e4e90c2b0204d3b17 to your computer and use it in GitHub Desktop.
Save amankharwal/7dbe5bd21faadf9e4e90c2b0204d3b17 to your computer and use it in GitHub Desktop.
import random
passlen = int(input("enter the length of password"))
s="abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?"
p = "".join(random.sample(s,passlen ))
print(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment