mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 18:38:39 +00:00
Update postfix_evaluation.py
This commit is contained in:
parent
0b1627a12d
commit
51df05ce11
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user