Answer the question
In order to leave comments, you need to log in
How to convert "number" to bytes and vice versa in Python?
Hello!
It is necessary to convert (essentially get raw) the number into bytes (s). What type to convert to is indicated through the type code, for example like this:
class DataType(Enum):
undef = -1
u8 = 1
u16 = 2
u32 = 3
u64 = 4
i8 = 5
i16 = 6
i32 = 7
i64 = 8
real32 = 9
real64 = 10
boolean = 11
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question