How to enter decimal/binary numbers when creating byte objects in python?
- by Eric
I'm using python 3.1.1.
I know that I can create byte objects using the byte literal in the form of b'...'. In these byte objects, each byte can be represented as a character(in ascii code if I'm not wrong) or as a hexadecimal/octal number. Hexadecimal and octal numbers can be entered using an escape of \x for hexadecimal numbers and just a \ for octal numbers.
However, there's no escape sequences for decimal or binary numbers. Is there any way to enter them into byte objects?