title: Can't .rstrip('.0') after a function PYTHON
body: <pre><code>def competitiveEating(t, width, precision):
      return str(round(t, precision)).center(width).rstrip('.0')
  </code></pre>
  
  <p>so I want to remove trailing .0s from whole numbers given through my input t thats being rounded to the precision number, when I do r.strip after .center nothing happens, I don't know much so I'm not sure if you can even put a .function after another .function (the rstrip after center). I was reading about      '{0:g}'.format(float(21)) here's <a href="https://stackoverflow.com/questions/385325/dropping-trailing-0-from-floats">a link</a> (the solved question doesn't work in this situation). I honestly don't even know how to add or use the {0:g}'.format(float(21)) part.. </p>