Please help on print string that contains 'tab' and 'newline'

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sun Jan 28 09:50:31 EST 2018


On Sat, 27 Jan 2018 21:23:02 -0500, Jason Qian via Python-list wrote:

> there are 0D 0A 09

If your string actually contains CARRIAGE RETURN (OD) NEWLINE (OA), and 
TAB (09) characters, then you don't need to do anything. Just call print, 
and they will be printed correctly.

If that doesn't work, then your input string doesn't contain what you 
think it contains. Please call this:

    print(repr(the_string))

and COPY AND PASTE the output here so we can see it.



-- 
Steve




More information about the Python-list mailing list