2 回答
TA贡献1895条经验 获得超7个赞
my_string
__repr__()
>>> print(my_string)why\does\it\happen?
>>> 'a\\b''a\\b'>>> len('a\\b')3
repr()
>>> print(repr(my_string))'why\\does\\it\\happen?'
\\
\n
\t
>>> print("this\text\is\not\what\it\seems")this ext\is ot\what\it\seems
\n
>>> print("this\\text\is\what\you\\need")this\text\is\what\you\need
TA贡献1880条经验 获得超4个赞
\d
d
\d
\t
DeprecationWarning
SyntaxError
\Foo
\foo
添加回答
举报