Update postfix_evaluation.py

This commit is contained in:
Christian Clauss 2023-08-23 14:30:48 +02:00 committed by GitHub
parent 0b1627a12d
commit 51df05ce11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,7 @@ def evaluate(post_fix: list[str], verbose: bool = False) -> float:
sep=" | ",
)
# evaluate the 2 values popped from stack & push result to stack
stack.append(OPERATORS[x](a, b))
stack.append(OPERATORS[x](a, b)) # type: ignore[index]
if verbose:
# output in tabular format
print(