I trying to convert numbers from decimal to hex. How do I convert `float` values to hex or char in Python 2.4.3?

I would then like to be able to print it as ("\xa5\x (new hex number here)"). How do I do that?