dxnge

17

Nov 2nd, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. f = open('24-2.txt').read()
  2. ltrs = [x[1] for x in zip(f, f[1::], f[2::]) if x[0] == 'X' and x[2] == 'Z']
  3. cnt = [[str(ltrs.count(i)),i] for i in 'QWERTYUIOPASDFGHJKLZXCVBNM']
  4. print(max(cnt)[1] + max(cnt)[0])
  5.  
Advertisement
Add Comment
Please, Sign In to add comment