Jul-03-2021, 11:49 AM
you can use formatter 'g', but this will chamge all numbers with zero exponents
example:
example:
print(f"{5.75:g}") print(f"{5.00:g}") print(f"{0.00:g}")
Output:5.75
5
0