The %e, %f, and %g formats display floating-point numbers in different ways, as the following interaction demonstrates : Format : String PYTHON TUTORIALS


PYTHON TUTORIALS » String » Format »

 

The %e, %f, and %g formats display floating-point numbers in different ways, as the following interaction demonstrates


x = 1.23456789
print x

print '%e | %f | %g' % (x, x, x)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo String
» Format