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

13 lines
355 B
Python

import re
def find_all_digit_substrings(file_path):
with open(file_path, 'r') as file:
lines = file.readlines()
for line in lines:
digit_substrings = re.findall(r'\d+', line)
if digit_substrings:
print(' '.join(digit_substrings))
file_path = './simple.in'
find_all_digit_substrings(file_path)