20240629 2710 - Easy - Array
2710. Remove Trailing Zeros From a String
class Solution:
def removeTrailingZeros(self, num: str) -> str:
j = len(num) - 1
while j > 0 and num[j] == "0":
j-=1
return num[:j+1]
2710. Remove Trailing Zeros From a String
class Solution:
def removeTrailingZeros(self, num: str) -> str:
j = len(num) - 1
while j > 0 and num[j] == "0":
j-=1
return num[:j+1]