Convert hex to string python. The first part before : is the input or variable to format.