Answers for "bytestring python"

0

bytestring python

>>> u1234 = str(b'\xe1\x88\xb4', 'utf-8')
>>> print (u1234) # if terminal supports UTF-8 AND python auto-infers
ሴ
>>> u1234.encode('unicode-escape')
b'\\u1234'
>>> print ('%04x' % ord(u1234))
1234
>>> type(u1234)
<class 'str'>
>>> len(u1234)
1
Posted by: Guest on May-26-2021

Code answers related to "bytestring python"

Python Answers by Framework

Browse Popular Code Answers by Language