forked from miczar1/djfz-24_25
Final solution of TaskB04
This commit is contained in:
parent
417d2efa32
commit
5c4e00956d
File diff suppressed because it is too large
Load Diff
@ -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 = []
|
||||||
|
Loading…
Reference in New Issue
Block a user