Files
pythonProject/24.7.py
Victor Alexandrovich Tsyrenschikov 2a7f887280 project
2025-11-21 00:36:55 +05:00

20 lines
379 B
Python

# import re
#
# with open('24_7.txt', 'r') as file:
# data = file.readline()
#
# data = re.sub('CD', '--', data)
#
# not_CD = r'(-?[^-]*)'
#
# CD_and_any = r'(?:--[^-]*){160}-?'
# la_CD_group = rf'(?=({CD_and_any}))'
#
# pattern = rf'{not_CD}{la_CD_group}'
#
# matches = re.findall(pattern, data)
#
# res = max([len(match[0] + match[1])
# for match in matches])
1