Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Jan 16, 2021
Embed
What would you like to do?
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