Comments¶
Be careful that some functions return bytecode instead of string in Python 3.
bytecode
has similar APIs tostr
. Most string functions can be applied to bytecode as well.
String to Bytecode¶
In [1]:
"abc".encode()
Out[1]:
ByteCode to String¶
In [3]:
b"abc".decode()
Out[3]: