diff --git a/24.5.py b/24.5.py index 0e67c75..9636f22 100644 --- a/24.5.py +++ b/24.5.py @@ -1,5 +1,5 @@ import re str1=open('24_5.txt').read() -result=re.split(r'^(?!.*PP).*',str1) -# print(max(list(map(len,result)))) \ No newline at end of file +result=re.split(r'(?<=P)P',str1) +print(max(list(map(len,result)))) \ No newline at end of file