forked from miczar1/djfz-24_25
zadanie 4 poprawione
This commit is contained in:
parent
0beb5c2db5
commit
f6dd2eef8c
@ -1,5 +1,7 @@
|
|||||||
with open('polish_wiki_excerpt.in', encoding='utf8') as f:
|
with open('polish_wiki_excerpt.in', encoding='utf8') as f:
|
||||||
lines = f.readlines()
|
lines = f.readlines()
|
||||||
|
results = []
|
||||||
|
i = 0
|
||||||
for line in lines:
|
for line in lines:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
||||||
@ -7,7 +9,7 @@ with open('polish_wiki_excerpt.in', encoding='utf8') as f:
|
|||||||
pom = ''
|
pom = ''
|
||||||
|
|
||||||
for char in line:
|
for char in line:
|
||||||
if char.isdigit():
|
if char in '0123456789':
|
||||||
pom += char
|
pom += char
|
||||||
elif pom != '':
|
elif pom != '':
|
||||||
subdigits.append(pom)
|
subdigits.append(pom)
|
||||||
|
Loading…
Reference in New Issue
Block a user