We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b56cb26 + 4b43a2f commit cebbf56Copy full SHA for cebbf56
other/password_generator.py
@@ -1,13 +1,14 @@
1
importstring
2
-fromrandomimport*
+importrandom
3
4
-letters=string.ascii_letters
5
-digits=string.digits
6
-symbols=string.punctuation
+letters=[letterforletterinstring.ascii_letters]
+digits=[digitfordigitinstring.digits]
+symbols=[symbolforsymbolinstring.punctuation]
7
chars=letters+digits+symbols
8
+random.shuffle(chars)
9
10
min_length=8
11
max_length=16
-password=''.join(choice(chars) forxinrange(randint(min_length, max_length)))
12
-print('Password: %s'%password)
+password=''.join(random.choice(chars) forxinrange(random.randint(min_length, max_length)))
13
+print('Password: '+password)
14
print('[ If you are thinking of using this passsword, You better save it. ]')
0 commit comments