24 PP
This commit is contained in:
1
24.5.py
1
24.5.py
@@ -2,6 +2,7 @@ import re
|
||||
|
||||
str1=open('24_5.txt').read().strip('\n')
|
||||
result=re.split(r'(?<=PP)',str1) #Позитивная ретроспективная проверка (Positive Lookbehind)
|
||||
result=re.split(r'(?=PP)',str1) #позитивная опережающая проверка (positive lookahead)
|
||||
# result=re.split(r'P(?=P)',str1)
|
||||
print(max(list(map(len,result))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user