Faqts : Business : Programming : Shopping For You : Python : Common Problems : Strings

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

9 of 31 people (29%) answered Yes
Recently 4 of 10 people (40%) 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".