human
convert hex to decimal
assistant
Here is some code to convert hex string '0xdeadbeef' to decimal

ast.literal_eval('0xdeadbeef')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.