how to convert bytearray to hex in python 2 code example Example: bytearray to hex python ''.join('{:02x}'.format(x) for x in StringToBeConverted)