Created
March 27, 2015 00:18
-
-
Save vijfhoek/a4ddf24f5811e05a84f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1 | |
['1'] | |
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1+5 | |
['1', '5', '+'] | |
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1+5*3 | |
['1', '5', '3', '*', '+'] | |
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 1*5+3 | |
['1', '5', '*', '3', '+'] | |
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 3X+5 | |
['3', 'X', '*', '5', '+'] | |
[vijfhoek@sijmen-laptop Algorithms]$ python shuntingyard.py 3X^2+5X-2 | |
['3', 'X', '2', '^', '*', '5', 'X', '*', '+', '2', '-'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment