task 4 done to check

This commit is contained in:
Robert 2024-11-25 12:42:37 +01:00
parent 834f781e2c
commit a7892ad185

10
TaskB04/task4.py Normal file
View File

@ -0,0 +1,10 @@
import re
with open('polish_wiki_excerpt.in', encoding='utf8') as file:
lines = file.readlines()
pattern = r'\d+'
for line in lines:
line = line.strip()
x = re.findall(pattern, line)
if x:
print(' '.join(x))