This is the code:
f = open(filename, ‘w’)
f.write(“hellotalex”)
The t inside the string is the escape sequence for the horizontal tabulation.
The Python reference manual includes several string literals that can be used in a string. These special sequences of characters are replaced by the intended meaning of the escape sequence.
Here is a table of some of the more useful escape sequences and a description of the output from them.
Escape Sequence Meaning
t Tab
\ Inserts a back slash ()
‘ Inserts a single quote (‘)
” Inserts a double quote (“”)