I want to write some block of text to .txt file.
example I am having text like:
" <?xml version=\"1.0\" encoding=\"utf-8\"?>
ParameterAllocation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="CGenCorrXSD_V1"> "
how can I write this text block into .txt file using python.
If I use File_name.write("--") it will write only single line and I have to use "\n" for every new line. I want to preserve same indentation format as well.
any easy method exists?