We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9e996a0 + 9954153 commit 85c7840Copy full SHA for 85c7840
Python/parenthesisBalancing.py
@@ -10,7 +10,7 @@ def checker(inp):
10
pairs[']']='['
11
stack=[]
12
for i in list(inp):
13
- if i==']' and i=='}' and i==')':
+ if i==']' or i=='}' or i==')':
14
len(stack)==0 or stack.pop() != pairs[i] ? return False:pass
15
else :
16
stack.push(i)
0 commit comments