I am new in Python. I have the following problem: I have a string with newline character and I want to write this string with newline character to a file. I want the new line character to be explicitly visible in the file. How can I do that please? This is my current code:
text = "where are you going?\nI am going to the Market?"
with open("output.txt",'w', encoding="utf-8") as output:
output.write(text)