On 19.06.2012 18:23, Edward C. Jones wrote:
> Consider the following line in C:
> printf('%a\n', x);
> where x is a float or double. This outputs a hexadecimal representation
> of x. Can I do this in Python?Don't know why there is no format character %a or %A in python, but the conversion is done by float method hex(): a = 3.1415 print a.hex() Greetings -- http://mail.python.org/mailman/listinfo/python-list
