I’ve learnt the concept of infix to postfix and now I can do by hand infix to postfix conversion. Now, I want to write code in Python for it.
First I need to know, how do I read values from left to right in Python?
Then, I need to know, how to check if the string is left paranthesis, operand, operator or right paranthesis in Python. Other than that, I can write it.
Once you read a value, you can then check if the value equals another character like “(” or “+” or equivalent to start building up your pattern matching logic.
Creating engaging and entertaining content for designers and developers since 1998.