tal wrote: > Hello, > I am trying to convert a hex string (for example: "0x12345678") to a > number (0x12345678 or just 12345678). > Can you help me please? > Thanks, Tal. >>> s = '0x12345678' >>> int(s, 0) 305419896 To get 12345678 instead, you'll have to use int(s[2:]) ... :-) Alex