Skip to content

Commit 6d17ccc

Browse files
authored
Update basic-calculator-iii.py
1 parent fa8d521 commit 6d17ccc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/basic-calculator-iii.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def compute(operands, operators):
2626
elif s[i] == '(':
2727
operators.append(s[i])
2828
elif s[i] == ')':
29-
while operators and operators[-1] != '(':
29+
while operators[-1] != '(':
3030
compute(operands, operators)
3131
operators.pop()
3232
elif s[i] in precedence:

0 commit comments

Comments
 (0)