Reputation: 4295
I do not understand this issue where my printing does not work
b = (u'\u0648\u0627\u0646\u0627', 'NN')
print b[0]
Output
**Nothing is printed**
However this works
b = ("haha", "hehe")
print b[0]
Output
haha
Upvotes: 0
Views: 181
Reputation: 249652
The answer seems to be that it's Arabic script, which prints right-to-left, so you may have missed it on the right-hand side of your screen.
Also you may need to set your terminal or emulator to UTF-8.
Upvotes: 1
Reputation: 153
Hey just check you have provided a wrong hexadecimal unicode
b = (u'\u068\u0627\u0646\u0627', 'NN')
^
3 digit hex try using
b = (u'\u0683\u0627\u0646\u0627', 'NN')
b[0]
prints right value as expected.
Upvotes: 0