13 lines
355 B
Python
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)
|