Delete 'TaskD04/run.py'
This commit is contained in:
parent
70a8f23e6c
commit
b7eaa6209f
@ -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='')
|
|
Loading…
Reference in New Issue
Block a user