I have a function taking float arguments (generally integers or decimals with one significant digit), and I need to output the values in a string with two decimal places (5
If you actually want to change the number itself instead of only displaying it differently use format()
Format it to 2 decimal places:
format(value, '.2f')
example:
>>> format(5.00000, '.2f') '5.00'