Advertisement
Farz0l1x

Untitled

Mar 27th, 2024
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. file = open('12.txt')
  2. s = file.readline()
  3. f = [1] * len(s)
  4. for i in range(1, len(s)):
  5.     if s[i-1] <= s[i]:
  6.         f[i] = f[i -1] + 1
  7.     else:
  8.         f[i] = 1
  9. print(max(f))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement