We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa8d521 commit 6d17cccCopy full SHA for 6d17ccc
Python/basic-calculator-iii.py
@@ -26,7 +26,7 @@ def compute(operands, operators):
26
elif s[i] == '(':
27
operators.append(s[i])
28
elif s[i] == ')':
29
- while operators and operators[-1] != '(':
+ while operators[-1] != '(':
30
compute(operands, operators)
31
operators.pop()
32
elif s[i] in precedence:
0 commit comments