I'm trying to delete a certain number of zeros at right. For example:
10101000000
I want to remove 4 zeros... And get:
1010100
I tried to do string.rstrip("0") or string.strip("0") but this remove all of zeros at right. How can I do that?
The answer is not duplicated because I can't use imports.


View Solution