title: Evaluating postfix in python?
body: <p>I want to write a fucnction to evaluate a postfix expression passed as a list. So far I have got:</p>
  
  <pre><code>def evalPostfix(text):
      s = Stack()
      for symbol in text:
          if symbol in "0123456789":
              s.push(int(symbol))
          if not s.is_empty():
              if symbol == "+":
                  plus = s.pop() + s.pop()
              if symbol == "-":
                  plus = s.pop() - s.pop()
              if symbol == "*":
                  plus = s.pop() * s.pop()
              if symbol == "/":
                  plus = s.pop() / s.pop()
  </code></pre>
  
  <p>But I think I have the wrong approach. Help?</p>