Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = open('26.txt')
- s = file.readline()
- s = s.replace('DBAC', '****')
- for i in range(3, len(s)):
- if s[i-2] == 'D' and s[i-3] == '*':
- s = s.replace(s[i-2], '*')
- if s[i-1] == 'B':
- s = s.replace(s[i-1], '*')
- if s[i] == 'A':
- s = s.replace(s[i], '*')
- if s[i-3:i-1] != '*D' and s[i-1] != '*' and s[i] != '*':
- s = s.replace(s[i-2:i+1], ' ')
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement