Define and ouuput string: 8-bit, 1-byte, 2-byte and 4-byte : Output Format « Development « Python
- Python
- Development
- Output Format
Define and ouuput string: 8-bit, 1-byte, 2-byte and 4-byte

print u'ab\x20cd' # 8-bit/1-byte characters
print u'ab\u0020cd' # 2-byte characters
print u'ab\U00000020cd' # 4-byte characters
Related examples in the same category