Controlling number of zeros of exponent in scientific notation

Russ P. Russ.Paielli at gmail.com
Wed Mar 6 14:11:44 EST 2013


One possibility is to form the string as usual, split on the "e", format each part separately, then rejoin with an "e".

On Tuesday, March 5, 2013 12:09:10 PM UTC-8, fa... at squashclub.org wrote:
> Instead of:
> 
> 
> 
> 1.8e-04
> 
> 
> 
> I need:
> 
> 
> 
> 1.8e-004
> 
> 
> 
> So two zeros before the 4, instead of the default 1.




More information about the Python-list mailing list