Say I got a unicode string from json which is u'ab', if I print it , I will get a b.But what I want now is print a string exactly as ab. How can I do it?
u'ab'
print
a b
ab
print(repr('ab'))
repr() gives you the "representation" of the string rather than the printing the string directly.
repr()
1.4m articles
1.4m replys
5 comments
57.0k users