This code opens the file "filename" in read mode and sets the encoding to "utf-8". It then reads lines from the file and prints each one to the console.
with open(filename, mode="r", encoding="utf-8") as file_handler:
lines = file_handler.readlines()
for line in lines:
print(line)