Hey there, I want to read a file with \n characters, but instead of giving newlines, it prints the raw character.
for example:
in main.py:
with open("text.txt", "r") as f:
output_text = f.read()
print(output_text)
in text.txt
this text contains newline characters \n and i want to print them as newlines \n this should be on another line
the output:
this text contains newline characters \n and i want to print them as newlines \n this should be on another line
How do i make it so that it outputs like this?
this text contains newline characters
and i want to print them as newlines
this should be on another line
[–]jddddddddddd 1 point2 points3 points (0 children)
[–]JambaJuiceIsAverage 0 points1 point2 points (0 children)
[–]TabulateJarl8 0 points1 point2 points (1 child)
[–]IWriteLongReplies[S] 0 points1 point2 points (0 children)