Python: Unicode

By Xah Lee. Date: . Last updated: .

What is unicode

Unicode in string

String in Python 3 is a sequence of unicode characters.

You might see string prefix with u, for example

x = u"abc"
print(x)
# abc

The u-prefix has no meaning in python 3.

the u-prefix is allowed for compatibility with python 2.

Python 2