# list 模拟栈
class Solution:
    def maxDepth(self, s: str) -> int:
        maxn = 0
        l = []
        for t in s:
            if t == '(':
                l.append(1)
                maxn = max(maxn, len(l))
            elif t == ')':
                l.pop()

        return maxn
ced6e4ec90880c2dbfc0873a49f71c8db3620528
<mask token>

class Solution:
    <mask token>

class Solution:

    def maxDepth(self, s: str) ->int:
        maxn = 0
        l = []
        for t in s:
            if t == '(':
                l.append(1)
                maxn = max(maxn, len(l))
            elif t == ')':
                l.pop()
        return maxn

# list 模拟栈
class Solution:
    def maxDepth(self, s: str) -> int:
        maxn = 0
        l = []
        for t in s:
            if t == '(':
                l.append(1)
                maxn = max(maxn, len(l))
            elif t == ')':
                l.pop()

        return maxn