Issue
I am using the following expression in C code:
sprintf(message, "0x%016llX; ", someIntValue);
How do I do the same in python?
I know in C what it means.
- the mandatory % character
- a 0 flag for padding
- the 16 as "minimum field width"
- the ll as "length modifiers"
- the x conversion specifier
What I don't know, is how to do it in python...
Solution
The same can be achieved using:
"0x%016X; " % someIntValue # Old style
Or:
"{:016X}; ".format( someIntValue ) # New style
Answered By - ikegami
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.