Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sacrificeRule():
- if len(sacrifices)!=4 and len(password)==4:
- if any(char.lower() not in string.ascii_lowercase for char in password):
- return False
- # if it got this far, then all letters are valid
- totalSacrifices = ""
- print("Sacrifice successful... muhahahaha")
- for letter in password:
- sacrifices.append(letter.lower())
- totalSacrifices += letter.lower()
- # IMPORTANT!!!! If the sacrifice rule is moved, change the 6 to something else.
- rules[6][0] = f"You have sacrificed these letters: {totalSacrifices}"
- return False
- else: # if this is an actual password
- return not any(password.find(char)>=0 or
- password.find(char.upper())>=0
- for char in sacrifices)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement