2414. Length of the Longest Alphabetical Continuous Substring
class Solution:
def longestContinuousSubstring(self, s: str) -> int:
ans=1
tans=ans
for i in range(1,len(s)):
if ord(s[i])==ord(s[i-1])+1:
tans+=1
ans=max(ans,tans)
else:
tans=1
return ans