TaskAO4 was ended
This commit is contained in:
parent
9c9b65d1ee
commit
c91aa0f040
44
TaskA04/run.py
Normal file
44
TaskA04/run.py
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
def checkNumber(i):
|
||||
if (i == '0'
|
||||
or i == '1'
|
||||
or i == '2'
|
||||
or i == '3'
|
||||
or i == '4'
|
||||
or i == '5'
|
||||
or i == '6'
|
||||
or i == '7'
|
||||
or i == '8'
|
||||
or i == '9'):
|
||||
return i
|
||||
else:
|
||||
return None
|
||||
def openFile(fileName):
|
||||
with open(fileName, "r", encoding="utf-8") as file:
|
||||
for row in file:
|
||||
lastCharacter = ''
|
||||
checkWord =''
|
||||
for i in row:
|
||||
if i == checkNumber(i):
|
||||
if lastCharacter != checkNumber(lastCharacter):
|
||||
checkWord += ' '
|
||||
checkWord += i
|
||||
else:
|
||||
checkWord += i
|
||||
if i == '\n':
|
||||
if checkWord != '':
|
||||
print(checkWord)
|
||||
checkWord = ''
|
||||
lastCharacter = i
|
||||
|
||||
|
||||
|
||||
print('---------------------SHAKESPEARE.EXP--------------------------------------')
|
||||
openFile('polish_wiki_excerpt.exp')
|
||||
print('----------------------SHAKESPEARE.EXP-----------------------------------')
|
||||
openFile('polish_wiki_excerpt.in')
|
||||
print('------------------------SIMPLE.IN------------------------------------')
|
||||
openFile('simple.in')
|
||||
print('-----------------------SIMPLE.EXP--------------------------------------')
|
||||
openFile('simple.exp')
|
@ -1,5 +1,5 @@
|
||||
cd jfz34234 34 dfd gfd 5
|
||||
34535
|
||||
fsdflskfjsdflk
|
||||
fsdflskf3jsdf3lk
|
||||
fsdkfj sdf34fdfd
|
||||
Firma powstała w 1992 r., z połączenia Authorware, Inc. (twórców pakietu Authorware) i MacroMind-Paracomp (producenta Macromind Director). W 1999 r. Macromedia zakupiła firmę Allaire i jej bi
|
||||
|
Loading…
Reference in New Issue
Block a user