Remove trailing zeroes python but with small restriction
<p>Whats a good way to remove trail zeroes for:</p>

<p>1.0 becomes 1.0</p>

<p>1.00 becomes 1.0</p>

<p>1.4560 becomes 1.456</p>

<p>1.4560000 becomes 1.456</p>

<p>1.40 becomes 1.4</p>
