Advertisement
IHATEMICROWAVEOVEN

sacrifice rule

Nov 3rd, 2024
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. def sacrificeRule():
  2. if len(sacrifices)!=4 and len(password)==4:
  3. if any(char.lower() not in string.ascii_lowercase for char in password):
  4. return False
  5. # if it got this far, then all letters are valid
  6. totalSacrifices = ""
  7. print("Sacrifice successful... muhahahaha")
  8. for letter in password:
  9. sacrifices.append(letter.lower())
  10. totalSacrifices += letter.lower()
  11. # IMPORTANT!!!! If the sacrifice rule is moved, change the 6 to something else.
  12. rules[6][0] = f"You have sacrificed these letters: {totalSacrifices}"
  13. return False
  14. else: # if this is an actual password
  15. return not any(password.find(char)>=0 or
  16. password.find(char.upper())>=0
  17. for char in sacrifices)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement