Farz0l1x

Untitled

Mar 5th, 2024
391
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. file = open('4.txt')
  2. A = file.readline()
  3. ans = 0
  4. for x in 'QWERTYUIOPASDFGHJKLZXCVBNM1234567890':
  5.     s = A.replace(x,' ')
  6.     s = list(map(str, s.split()))
  7.     ans = max(ans, len(max(s, key = len)))
  8. print(ans)
Advertisement
Add Comment
Please, Sign In to add comment