This commit is contained in:
Adam 2020-12-06 15:30:31 +01:00
parent f7e178e42a
commit a663fced49
2 changed files with 50005 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -19,15 +19,15 @@ def change_line(word_list, curr_line):
for word in word_list:
curr_line = curr_line.replace(word, word.swapcase())
return curr_line
return curr_line.rstrip('\n')
# for line in open("./polish_wiki_excerpt.in", "r"):
for line in sys.stdin:
for line in open("./polish_wiki_excerpt.in", encoding="utf8"):
# for line in sys.stdin:
found_words = re.findall(pattern, line)
out = change_line(found_words, line)
print(out).rstrip('\n')
if out:
print(out)