MATLAB: Printing the literal characters \n instead of a new line

fprintf

Hello,
I am trying to use fprintf() to print to a file. I am trying to print the literal characters "\n". The line of code looks like:
fprintf(fmst,'txt = string.join( (''Elapsed_Time: '',str(te),''\n'') )\r\n');
fmst is a valid file identification number. I want the string to print out as:
txt = string.join(('Elapsed_Time: ',str(te),'\n'))\r\n
where the last \r\n is actuall a carriage return and line feed. The line is printing as:
txt = string.join(('Elapsed_Time: ',str(te), ))
To put this into context, I am using MATLAB to generate a bunch of Python scripts and I need the line to print out just like I have shown below. Any help would be greatly appreciated.
Thanks, Pete

Best Answer

fprintf(fmst,'txt = string.join( (''Elapsed_Time: '',str(te),''\\n'') )\r\n');