Python equivalent to the "A" or "a" output conversions in C

Edward C. Jones edcjones at
Tue Jun 19 18:23:52 CEST 2012

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?

More information about the Python-list mailing list