next up previous contents
Next: String Operations Up: String Data Previous: Special Characters and Raw   Contents

Unicode Strings

Starting with version 2.0, python provides support for Unicode strings, whose characters are stored in 16 bits instead of the 8 bits used by a normal string. To specify that a string should be stored using this format, precede the opening quote character with either a lowercase or uppercase ``U''. In addition, an arbitrary Unicode character can be specified with the notation ``\uhhhh'', where hhhh represents a four-digit hexadecimal number.

Notice that if a unicode string is combined with a regular string, the resulting string will also be a Unicode string.



Phil Spector 2003-11-12