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 b6d6468 commit deb39f9Copy full SHA for deb39f9
password_generator/password_generator.py
@@ -60,9 +60,9 @@ def get_password(length: int) -> str:
60
def shuffle(password: list):
61
# n used to determine range of loop
62
n = len(password)
63
- for x in range(n-1, 0, -1):
+ for x in range(n - 1, 0, -1):
64
# set new variable y to random int within needed index
65
- y = secrets.choice(range(0, x+1))
+ y = secrets.choice(range(0, x + 1))
66
# swap elements at index x and index y
67
password[x], password[y] = password[y], password[x]
68
# return concatenated password
@@ -113,4 +113,3 @@ def main(args: argparse.Namespace) -> None:
113
114
# calling the main method with the args
115
main(args)
116
-
0 commit comments