jfz-2023-s473564/TaskD03/run.py
2023-11-27 14:34:07 +01:00

13 lines
329 B
Python

import re
def find_date_lines(file_path):
with open(file_path, 'r',encoding = 'utf-8') as file:
for line in file:
line = line.strip()
match = re.search(r'.*19[0-9][0-9] r\..*', line)
if match:
print(f"{line}")
file_path = './simple.in'
find_date_lines(file_path)