Delete 'TaskD04/run.py'

This commit is contained in:
Veronika Polevara 2023-12-10 22:05:54 +01:00
parent 70a8f23e6c
commit b7eaa6209f

View File

@ -1,21 +0,0 @@
import re
import sys
def remove_non_digits(line):
return re.sub(r'[^0-9\s]', '', line)
processed_lines = []
for line in sys.stdin:
processed_line = remove_non_digits(line)
processed_line = re.sub(r'^\s+|\s+$', '', processed_line)
processed_line = re.sub(r'\s+', ' ', processed_line)
digit_groups = re.findall(r'\d+', processed_line)
if digit_groups:
processed_lines.append(' '.join(digit_groups))
print('\n'.join(processed_lines), end='')