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

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

7 of 8 people (88%) answered Yes
Recently 4 of 5 people (80%) answered Yes

Entry

I have an ascii string like 0C44DH. Is there a Python function to convert it to decimal?

Jun 16th, 2000 03:41
unknown unknown, Donn Cave


Yes, everything except that trailing H anyway.  I'd use 
string.atoi('c44d', 16), and I guess in the end that is about the same 
thing as int('c44d', 16)