jfz-2023-s474155/TaskD01/run.py

15 lines
346 B
Python
Raw Normal View History

2023-11-27 13:18:58 +01:00
import sys
inFile = sys.argv[1]
outFile = sys.argv[2]
# inFile = 'simple.in'
# outFile = 'simple.out'
with open(inFile, 'r', encoding='utf-8') as inputFile, open(outFile, 'w', encoding='utf-8') as outputFile:
for line in inputFile:
if 'hamlet' in line.lower():
outputFile.write(line)
# print(line, end='')