binascii.b2a_hex()

binascii.b2a_hex(data) → s; Hexadecimal representation of binary data.

This function is also available as “hexlify()”.