I have found a text from a book that says the following:
In Python 3.X, the normal
str
string handles Unicode text (including ASCII, which is just a simple kind of Unicode); a distinctbytes
string type represents raw byte values (including media and encoded text); and 2.X Unicode literals are supported in 3.3 and later for 2.X compatibility (they are treated the same as normal 3.Xstr
strings).
Question : what are 2.X Unicode literals?
In Python 2.X, the normal
str
string handles both 8-bit character strings (including ASCII text) and raw byte values; a distinctunicode
string type represents Unicode text; and 3.X bytes literals are supported in 2.6 and later for 3.X compatibility (they are treated the same as normal 2.Xstr
strings):
Question : what are 3.X bytes literals?