I have some Perl code where the hex() function converts hex data to decimal. How can I do it on Python?
If by "hex data" you mean a string of the form
s = "6a48f82d8e828ce82b82"
you can use
i = int(s, 16)
to convert it to an integer and
str(i)
to convert it to a decimal string.