Let's say I have a file. How do I write "hello" TAB "alex"?
This is the code:
f = open(filename, 'w') f.write("hello\talex")
\t inside the string is the escape sequence for the horizontal tabulation.
You can use \t in a string literal: