I have a program which is reading the temperature. It read it and prints it like "1684 °C" and I need to split this to be like "16,84 °C". The number is a string.
CodePudding user response:
You might try to use the following:
my_str = "1684 °C"
my_str = my_str[:2] "," my_str[2:]