1 2 3 4 5 | import random passlen = int(input("Enter the length of password")) s="abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?" p = "".join(random.sample(s,passlen )) print(p) |
Output 1:
Enter the length of password
8
I^GOo9)2
Output 2:
Enter the length of password
12
pLfdoThK2eny
No comments:
Post a Comment