title: stack, push and pop in python
body: <p>The question is to write a function that creates a stack, pushes the letters in the given parameter string onto the stack and pops them off as indicated by the <code>'*'</code>s in the parameter string. A letter in the expression indicates a push onto the stack, and an asterisk indicates a pop operation. The function is called <code>modify_stack</code>, which accepts a single string as a parameter and returns the sequence of values returned by the pop operations. Calling the function using <code>print(modify_stack('EAS*Y*QUE***ST***IO*N***'))</code></p>
  
  <p>My code:</p>
  
  <pre><code>def modify_stack(symbolString):
      stack=Stack()
      i=0
      for i in symbolString:
          if i != '*':
              stack.push(i)
          else:
              print(stack.pop())
  </code></pre>
  
  <p>Right answer is <code>'SYEUQTSAONIE'</code>, but I got something different. Please point out where I went wrong. </p>