how to take off trailing 0 in python code example Example: how to remove trailing zeros in python a_string = a_string.strip("0")