Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import printable
- #print(printable)
- s = open('24.txt').readline()
- S = s
- for c in 'FGHIJKLMNOPQRSTUVWXYZ':
- s = s.replace(c, '!')
- s = s.split('!')
- a = []
- for e in s:
- if '8' not in e:
- continue
- l = e.index('8')
- r = max(e.rfind('8'), e.rfind('0'))
- a.append(e[l:r+1])
- answ = '0'
- for e in a:
- if int(e, 16) > int(answ, 16):
- answ = e
- print(answ)
- print(S.find(answ))
Advertisement
Add Comment
Please, Sign In to add comment