I want to print floating point numbers with a set number of significant (i.e. non-zero) digits, but avoid the scientific notation (e).
So, for example, the number 0.000000002343245345 should be printed as 0.000000002343 (and not 2.343e-09)
I know how to define number of significant digits with an e notation:
>>>print('{:.3e}'.format(0.000000002343245345)) 2.343e-09 And how to print a set number of decimal places without e-notation:
>>>print('{:.12f}'.format(0.000000002343245345)) 0.000000002343 but not how to combine the two. is there any simple way of doing so?