Use int(x, base) with 16 as base to convert the string x to an integer. Call hex(number) with the integer as number to convert it to hexadecimal.
確定! 回上一頁