diff --git a/TaskA04/task4.py b/TaskA04/task4.py index 88c5316..72fbf94 100644 --- a/TaskA04/task4.py +++ b/TaskA04/task4.py @@ -1,5 +1,7 @@ with open('polish_wiki_excerpt.in', encoding='utf8') as f: lines = f.readlines() + results = [] + i = 0 for line in lines: line = line.strip() @@ -7,7 +9,7 @@ with open('polish_wiki_excerpt.in', encoding='utf8') as f: pom = '' for char in line: - if char.isdigit(): + if char in '0123456789': pom += char elif pom != '': subdigits.append(pom)