I format the values in a string, it is necessary that only significant digits on the right are saved, and if they are not there at all, the number is inserted into the string as an integer. I.e:
x = 10.0 # Типа флот y = 12.2 '{1:тут_какой-то_хитрый_формат} - {2:такой_же_формат}'.format(x, y) --> '10 12.2'