According to Python docs here , when exiting a type, it defaults to using the type βgβ for floating point arguments.
However
print("{0:.2}".format(14.9))
prints "1.5e + 01", and
print("{0:.2g}".format(14.9))
prints "15"
Is this just a problem with the wrong documentation or is there another reason for this?
source
share