hex_str = input("16進数を入力して下さい") value = int(hex_str, 16) print("値は", value, "です!") # プログラム4-24(16進数が表す値)