osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to write raw strings to Python


I want to write, say, 'hello\tworld' as-is to a file, but doing f.write('hello\tworld') makes the file
look like:
hello	world

How can I fix this? Thanks in advance.

Sam