Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open("4.txt", "r").read()
- suspects = []
- for idx, letter in enumerate(file):
- try:
- if letter.isupper() and file[(idx+1)].isupper() and file[(idx+2)].isupper() and file[(idx+4)].isupper() and file[(idx+5)].isupper() and file[(idx+6)].isupper() and file[(idx+3)].islower():
- suspect = str(letter)
- for i in range(1,7):
- suspect += file[(idx + i)]
- suspects.append(suspect)
- except IndexError:
- print("There are 3 errors of that kind...")
- prep = ""
- for suspect in suspects:
- prep+= suspect[3]
- print(prep)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement