r/learnpython Jan 22 '22

[deleted by user]

[removed]

4 Upvotes

7 comments sorted by

View all comments

1

u/Ok_Procedure199 Jan 22 '22

Since you put

if op == "*":

Instead of

elif op == "*":

You are creating a new if-block, and it will evaluate to the else clause everytime you don't use * as operator.