zadanie 4 poprawione

This commit is contained in:
LuminoX 2024-11-14 20:46:13 +01:00
parent 0beb5c2db5
commit f6dd2eef8c

View File

@ -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)