filepath = 'Iliad.txt'
with open(filepath) as fp:
line = fp.readline()
cnt = 1
while line:
print("Line {}: {}".format(cnt, line.strip()))
line = fp.readline()
cnt += 1
file = open("sample.txt", "w")
file.write("Hello
")
file.write("World
")
file.close()