Skip to content

Instantly share code, notes, and snippets.

@ShawonAshraf
Created November 25, 2021 21:14
Show Gist options
  • Save ShawonAshraf/74d20ef094188c40b99f131b787c2b6f to your computer and use it in GitHub Desktop.
Save ShawonAshraf/74d20ef094188c40b99f131b787c2b6f to your computer and use it in GitHub Desktop.
# 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