From f6dd2eef8c401f06a95133bed477514d8e610e91 Mon Sep 17 00:00:00 2001 From: LuminoX Date: Thu, 14 Nov 2024 20:46:13 +0100 Subject: [PATCH] zadanie 4 poprawione --- TaskA04/task4.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)