Skip to content

Commit deb39f9

Browse files
authored
Update password_generator.py
1 parent b6d6468 commit deb39f9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

password_generator/password_generator.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def get_password(length: int) -> str:
6060
def shuffle(password: list):
6161
# n used to determine range of loop
6262
n = len(password)
63-
for x in range(n-1, 0, -1):
63+
for x in range(n - 1, 0, -1):
6464
# set new variable y to random int within needed index
65-
y = secrets.choice(range(0, x+1))
65+
y = secrets.choice(range(0, x + 1))
6666
# swap elements at index x and index y
6767
password[x], password[y] = password[y], password[x]
6868
# return concatenated password
@@ -113,4 +113,3 @@ def main(args: argparse.Namespace) -> None:
113113

114114
# calling the main method with the args
115115
main(args)
116-

0 commit comments

Comments
 (0)