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.
1 parent c4a14b2 commit 1a68e9eCopy full SHA for 1a68e9e
RandomPassword/password.py
@@ -8,8 +8,5 @@
8
9
print("List(s) of Generated passwords: ")
10
11
-for pwd in range(numPass):
12
- pw=''
13
- for c in range(length):
14
- pw += random.choice(passwrd) # Choice() function returns a random element from a iterable element.
15
- print(pw)
+for _ in range(numPass):
+ print(''.join(random.sample(passwrd, k=length))) #sample() generates an array of random characters of length k
0 commit comments