[Python] Minimum Remove to Make Valid Parentheses Solution | easy way
Easy if else conditions\n\n\nclass Solution:\n    def minRemoveToMakeValid(self, s: str) -> str:\n        s = list(s)\n        left_parr = 0\n        left_ind =
Easy if else conditions\n\n```\nclass Solution:\n    def minRemoveToMakeValid(self, s: str) -> str:\n        s = list(s)\n        left_parr = 0\n        left_ind = []\n        for i in range(len(s)):\n            if s[i] == \')\' and left_parr == 0:\n                s[i] = \'\'\n            elif s[i] == \'(\':\n                left_parr += 1\n                left_ind.append(i)\n            elif s[i] == \')\' and left_parr > 0:\n                left_parr -= 1\n                left_ind.pop()\n\n        if len(left_ind) > 0:\n            for j in left_ind:\n                s[j] = \'\'\n\n        return \'\'.join(s)\n```
['Python']