diff --git a/TaskB04/task4.py b/TaskB04/task4.py new file mode 100644 index 0000000..f115482 --- /dev/null +++ b/TaskB04/task4.py @@ -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)) \ No newline at end of file