faqts : Computers : Programming : Languages : Python : Common Problems : Strings

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

7 of 27 people (26%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I convert a hex number to a string?

Jul 6th, 2000 03:35
unknown unknown, Remco Gerlich


x = 0x26100     
y = "0x%x" % x  # String formatting "%x" formatter makes hex numbers

y is now "0x26100".