zpwiki/pages/students/2016/darius_lindvai/dp2021/script1.py
2020-04-10 09:34:14 +02:00

12 lines
309 B
Python
Executable File

# coding: utf-8
#!/usr/bin/python
import codecs
import sys
with codecs.open(sys.argv[2],'w') as out_txt:
with codecs.open(sys.argv[1],'r') as text:
for line in text:
line = line.replace('.','PER').replace(',','COM').replace('?','QUE')
out_txt.write(line)