I want to take an integer (that will be <= 255), to a hex string representation
e.g.: I want to pass in 65 and get out \'\\x41\', or
65
\'\\x41\'
(int_variable).to_bytes(bytes_length, byteorder='big'|'little').hex()
For example:
>>> (434).to_bytes(4, byteorder='big').hex() '000001b2' >>> (434).to_bytes(4, byteorder='little').hex() 'b2010000'