Home > other >  Python integer into bytecode little doubt
Python integer into bytecode little doubt

Time:09-23


Existing x=512, y=51, converts it to the hex, x=0 x200, y=0 x33,
Demand is: "any given an integer, how to convert them into 2 bytes of byte code, such as x converted expressed as \ x00 \ x02, y \ x33 \ x00",
I met now the question is: can successfully change x, but y problems after conversion, see below:

CodePudding user response:

Integer not greater than 65535, of course, two bytes is enough
  • Related