This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2025-11-12 00:03:34 +05:00
parent e5fa54aa76
commit a29990d847

View File

@@ -2,6 +2,7 @@ import re
str1=open('24_5.txt').read().strip('\n') str1=open('24_5.txt').read().strip('\n')
result=re.split(r'(?<=PP)',str1) #Позитивная ретроспективная проверка (Positive Lookbehind) result=re.split(r'(?<=PP)',str1) #Позитивная ретроспективная проверка (Positive Lookbehind)
result=re.split(r'(?=PP)',str1) #позитивная опережающая проверка (positive lookahead)
# result=re.split(r'P(?=P)',str1) # result=re.split(r'P(?=P)',str1)
print(max(list(map(len,result)))) print(max(list(map(len,result))))