Advertisement
bl00dt3ars

07. Safe Passwords Generator

Nov 23rd, 2020 (edited)
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. x = int(input())
  2. y = int(input())
  3. max_combinations = int(input())
  4. total_combinations = 0
  5. is_true = False
  6.  
  7. for a in range(35, 56):
  8.     if is_true:
  9.         break
  10.     for b in range(64, 97):
  11.         if is_true:
  12.             break
  13.         for c in range(1, x + 1):
  14.             for d in range(1, y + 1):
  15.                 if total_combinations < max_combinations:
  16.                     print(f"{chr(a)}{chr(b)}{c}{d}{chr(b)}{chr(a)}", end="|")
  17.                     total_combinations += 1
  18.                     a += 1
  19.                     if a > 55:
  20.                         a = 35
  21.                     b += 1
  22.                     if b > 96:
  23.                         b = 64
  24.                     if c == x and d == y:
  25.                         is_true = True
  26.                         break
  27.                 else:
  28.                     is_true = True
  29.                     break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement