fix
This commit is contained in:
parent
f7e178e42a
commit
a663fced49
File diff suppressed because one or more lines are too long
@ -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)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user