I have a .ini file with values as below
[Value1]
data_type = uint16_t
value = 0x0001U
[Value2]
data_type = uint32_t
value = 0x00000002UL
[Value4]
data_type = uint8_t
value = 5U
I am unable to convert these values to hexadecimal as below Comment: I am easily able to read .ini file using configparser. Let assume i have value as string in variable var and I want to convert that string variable to hex form
print (hex(var)) #this should print the hexadecimal value