I'd like to output temperature in a log, with values between 0 and 30. I'd like the decimal separators to be aligned between rows and also the number of decimals to be fixed, e.g.:
a = 7.56, s = 20.00
a = 21.03, s = 20.00
a = 20.01, s = 20.00
a = 1.10, s = 5.00
The actual numbers may be irrational, and they should be rounded to 2 places after the decimal separator. Ideally I'd like to use the f-strings for code readability, but any other format specification would also be OK. Can I achieve this, without rounding and generating the strings myself? All my attempts (and Googling) so far failed: I cannot keep the number of digits after decimal point fixed.