Python : Print unicode escape characters and string
Couple of examples on how to print unicode string in Python. Nothing fancy, but it helps to explore the ways to print unicode characters in Python.
# - *- coding: utf- 8 - *-
print " 我爱你"
print u'\u0420\u043e\u0441\u0441\u0438\u044f'
goodmorning = "おはよう"
print (goodmorning)
Output :
我爱你
Россия
おはよう
Reference :
See also : Python : Fix SyntaxError: Non-ASCII character in file, but no encoding declared
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+6.7k Get form post value in Go
+6k Golang : Get local time and equivalent time in different time zone
+4.2k Golang : Metaprogramming example of wrapping a function
+2.7k AWS S3 : Prevent Hotlinking policy
+3.4k Golang : Add build version and other information in executables
+8.7k Curl usage examples with Golang
+1.8k Linux : How to fix Brother HL-1110 printing blank page problem
+9.7k Golang : Check if a file exist or not
+2k Golang : micron to centimeter example
+13.3k Golang : Get password from console input without echo or masked
+1.3k Linux : How to install driver for 600Mbps Dual Band Wifi USB Adapter