title: How to avoid printing scientific notation in python without adding extra digits?
body: <p><a href="https://stackoverflow.com/questions/658763/how-do-i-suppress-scientific-notation-in-python">This question</a> asks how to suppress scientific notation in python.</p>
  
  <p>I have a series of numbers to display -- small powers of 10 -- and I'd like to display them without trailing zeros. I.e. 0.1, 0.01, and so on to 0.000001</p>
  
  <p>If I do <code>"%s" % 10 ** -6</code> I get <code>'1e-06'</code>. If I use <code>"%f" % 10 ** -6</code> I get <code>'0.000001'</code> which is what I want.</p>
  
  <p>However, <code>"%f" % 10 ** -3</code> yields <code>'0.001000'</code> which violates the "without trailing zeros" constraint.</p>
  
  <p>It's not hard to brute force a way around this (regex replacement or something), but I'm wondering if there's some format string magic I'm missing.</p>