1 2 3 4 5 6 7
def HEX(vals): if vals is not None: if type(vals) is int: return "%.2x"%vals return ' '.join('%.2x'%x for x in vals) return ''