Created
November 25, 2021 21:14
-
-
Save ShawonAshraf/74d20ef094188c40b99f131b787c2b6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fragments | |
from fragments import get_random_text | |
def easy_password(length: int): | |
psw = "" | |
while len(psw) != length: | |
chunk = psw + get_random_text() | |
if (len(chunk)-length == 1) or ((len(chunk) > length)): | |
psw = psw | |
else: | |
psw = chunk | |
return psw | |
inputs = [10, 12, 13, 14, 15] | |
for i in inputs: | |
print(f"input = {i} ->") | |
print(f"{easy_password(i)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment