diff --git a/24.5.py b/24.5.py new file mode 100644 index 0000000..ae90b68 --- /dev/null +++ b/24.5.py @@ -0,0 +1,6 @@ +import re + +str1=open('24_5.txt').read() +pattern = r"^(?!.*PP).*$" +result=re.findall(r'^.*(P)(\1).*$',str1) +# print(max(list(map(len,result)))) \ No newline at end of file