Hi all,
I wanted to write the following line to the file.
sys.stdout.write("123: The metro polis\n")
But the line that was written is:
sys.stdout.write("100: The metro polis
")
How do I get the \n to be written in the text form to the? file(ie it should not be interpreted as a newline character, instead it should be printed as it is ie as "\n" only.
Any help would be greatly appreciated.
And I had extracted the "123: The metro polis" as a list item from some other string.
i concatenated the string and the list item as follows:
ll[1] --------> this is> 123: The metro polis
str = "sys.stdout.write"
Concatenation :
str += ll[1]