Hi Sam, import string b = "6b584" i=string.atoi(b,16) print hex(i) 0x6b584 Richard Sam Wun <swun at esec.com.au> wrote in message news:3952EC0D.D5CF9066 at esec.com.au... > Suppose here is: > > b = "6b584" > > I would like to b to hex. Does anyone know how to do that in python? > > > Thanks > Sam. > >