1
class Solution:
2
def removeOccurrences(self, s: str, part: str) -> str:
3
n = len(part)
4
while part in s:
5
i = s.index(part)
6
s = s[:i] + s[i + n :]
7
return s

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0