HTMLify
LeetCode - Remove All Occurrences of a Substring - Python
Views: 308 | Author: abh
1 2 3 4 5 6 | class Solution: def removeOccurrences(self, s: str, part: str) -> str: while part in s: s = s.replace(part, "", 1) print(s) return s |