Skip to content

Commit 012c46d

Browse files
authored
Update Solution.py
1 parent 37eb1d9 commit 012c46d

File tree

1 file changed

+3
-3
lines changed
  • solution/1100-1199/1190.Reverse Substrings Between Each Pair of Parentheses

1 file changed

+3
-3
lines changed

solution/1100-1199/1190.Reverse Substrings Between Each Pair of Parentheses/Solution.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ class Solution:
22
def reverseParentheses(self, s: str) -> str:
33
stk = []
44
for c in s:
5-
if c == ')':
5+
if c == ")":
66
t = []
7-
while stk[-1] != '(':
7+
while stk[-1] != "(":
88
t.append(stk.pop())
99
stk.pop()
1010
stk.extend(t)
1111
else:
1212
stk.append(c)
13-
return ''.join(stk)
13+
return "".join(stk)

0 commit comments

Comments
 (0)