d04
This commit is contained in:
parent
c40716abe8
commit
f3924b4961
14
TaskD04/run.py
Normal file
14
TaskD04/run.py
Normal file
@ -0,0 +1,14 @@
|
||||
import re
|
||||
import os
|
||||
|
||||
def find_digits(file_path):
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
txt = file.read()
|
||||
pattern = re.compile(r'\d+')
|
||||
return pattern.findall(txt)
|
||||
|
||||
|
||||
|
||||
path = os.path.join(os.path.dirname(__file__), 'simple.in')
|
||||
matches = find_digits(path)
|
||||
print(matches)
|
Loading…
Reference in New Issue
Block a user