dxnge

tsk 24

Nov 4th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. with open('24 (1).txt') as f:
  2.     cur_cnt, cnt = 0, 0
  3.     while a := f.read(1):
  4.         if a in map(str, range(10)):
  5.             if cnt < cur_cnt:
  6.                 cnt = cur_cnt
  7.             cur_cnt = 0
  8.         else:
  9.             cur_cnt += 1
  10. print(cnt)
  11.  
Advertisement
Add Comment
Please, Sign In to add comment