I'm on x86, little-endian. So I got this data from a udp packet.
data, addr = sock.recvfrom(1024)
print(data)
gives something like '\xfe\x15'
which I understand to be the little-endian layout in memory.
The value should be represented as 0x15fe
In C i do,
printf("%x", hexvalue);
and it gives me 0x15fe straightaway.
How do I get Python to print the hexadecimal value out properly?
Many thanks.