2390. Removing Stars From a String
class Solution: def removeStars(self, s: str) -> str: stk = [] for i in s: stk.pop() if i == "*" and stk else stk.append(i) return "".join(stk)