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

Discussion in 'Python' started by Mark Lawrence, Jun 19, 2012.

  1. On 19/06/2012 17: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?
    >


    See this http://docs.python.org/library/string.html#format-examples

    --
    Cheers.

    Mark Lawrence.
    Mark Lawrence, Jun 19, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan Stromberg
    Replies:
    2
    Views:
    471
    Michael Spencer
    Jan 22, 2005
  2. Replies:
    10
    Views:
    694
    Jasen Betts
    Aug 5, 2005
  3. John Bokma

    Is there a $. equivalent for output?

    John Bokma, Sep 4, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    80
    John Bokma
    Sep 5, 2003
  4. Edward C. Jones
    Replies:
    1
    Views:
    239
    Alexander Blinne
    Jun 19, 2012
  5. Edward C. Jones
    Replies:
    1
    Views:
    282
    jmfauth
    Jun 19, 2012
Loading...

Share This Page