class Solution: def secondsToRemoveOccurrences(self, s: str) -> int: secs = 0 while "01" in s: s = s.replace("01", "10") secs += 1 return secs