I want to display:
49 as 49.00
49
49.00
and:
54.9 as 54.90
54.9
54.90
Regardless of the length of the decimal
This is the same solution as you have probably seen already, but by doing it this way it's more clearer:
>>> num = 3.141592654
>>> print(f"Number: {num:.2f}")