Final solution of TaskB04

This commit is contained in:
eddie 2024-11-26 17:49:01 +01:00
parent 417d2efa32
commit 5c4e00956d
2 changed files with 19945 additions and 19438 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,17 +2,12 @@ import sys
import re import re
def solve(lines): def solve(lines):
# filter all substrings that match p = re.compile(r"\d+")
# print return [
# print(None, re.findall(r"\b\d+\b", lines[3])) ' '.join(re.findall(p, l)) + '\n'
# return [] for l in lines
p = re.compile(r"\b\d+\b") if re.search(p, l)
res = [] ]
for l in lines:
m = re.findall(p, l)
if m:
res.append(' '.join(m) + '\n')
return res
if __name__ == "__main__": if __name__ == "__main__":
lines = [] lines = []