In 68 src Out 68 f1d0 In 69 hx dict for in enumerate 0123456789abcdef

1
2
3
4
5
6
7
8
9
In [68]: src
Out[68]: 'f1d0'
In [69]: hx = dict( (h,d) for d,h in enumerate('0123456789abcdef'))
In [70]: l = len(src)
In [71]: sum([hx[src[l-1-x]] * (16**x) for x in range(len(src))])
Out[71]: 61904