15 lines
346 B
Python
15 lines
346 B
Python
|
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='')
|
||
|
|