Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions RandomPassword/password.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@

print("List(s) of Generated passwords: ")

for pwd in range(numPass):
pw=''
for c in range(length):
pw += random.choice(passwrd) # Choice() function returns a random element from a iterable element.
print(pw)
for _ in range(numPass):
print(''.join(random.sample(passwrd, k=length))) #sample() generates an array of random characters of length k