We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b56cb26 + 4b43a2f commit cebbf56Copy full SHA for cebbf56
other/password_generator.py
@@ -1,13 +1,14 @@
1
import string
2
-from random import *
+import random
3
4
-letters = string.ascii_letters
5
-digits = string.digits
6
-symbols = string.punctuation
+letters = [letter for letter in string.ascii_letters]
+digits = [digit for digit in string.digits]
+symbols = [symbol for symbol in string.punctuation]
7
chars = letters + digits + symbols
8
+random.shuffle(chars)
9
10
min_length = 8
11
max_length = 16
-password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
12
-print('Password: %s' % password)
+password = ''.join(random.choice(chars) for x in range(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