Python view newlines & tabs in string
View a string's newlines and tabs in Python.
>>> import pprint
>>> s = 'a\n\tb\nc'
>>> print(s)
a
b
c
>>> print(pprint.pformat(s))
'a\n\tb\nc'
View a string's newlines and tabs in Python.
>>> import pprint
>>> s = 'a\n\tb\nc'
>>> print(s)
a
b
c
>>> print(pprint.pformat(s))
'a\n\tb\nc'
Comments
Leave a Reply