import re #Write a program to find all maximum substrings of digits. #Return only these substrings separated by spaces in their order. #Do use regular expressions. def liczby_reg(file_path): with open(file_path, 'r', encoding='utf-8') as file: for line in file: number = (re.findall(r'\d+', line)) if number: print(' '.join(number)) file_path = 'TaskD04\simple.in' liczby_reg(file_path)