def competitiveEating(t, width, precision):
return str(round(t, precision)).center(width).rstrip('.0')
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 link (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..