cdarwin/python_class — pull request #1 by griesmey (2012-04-11 07:51:44+00:00)
Title: I changed it so that you can have as many * and / operands that you want...

... and I added a main. Not sure why you are iterating till len(num) - 2 and then accessing num[2]...You can just use 1..len(num) which when len = 5 it will go from 1..4. Here is an example that I tested:

input:
+ 3 4 5 6 6
- 5 3
+ 3 4 5 6 7 8 79 60 50
* 4 5 10 40 30 1 3 4 5 4 3 4 5 4
/ 10 1 2 5

output:
3 + 4 + 5 + 6 + 6 = 24
5 - 3 = 2
3 + 4 + 5 + 6 + 7 + 8 + 79 + 60 + 50 = 222
4 * 5 * 10 * 40 * 30 * 1 * 3 * 4 * 5 * 4 * 3 * 4 * 5 * 4 = 13824000000
10 / 1 / 2 / 5 = 1