I need to create a string of hex digits from a list of random integers (0-255). Each hex digit should be represented by two characters: 5 - \"05\", 16 - \"10\", etc.
With python 2.X, you can do the following:
numbers = [0, 1, 2, 3, 127, 200, 255] print "".join(chr(i).encode('hex') for i in numbers)
print
'000102037fc8ff'