betoesquivel

simulandoUnStack

Jan 21st, 2015
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. >>> stack = list()
  2. >>> stack.extend([5,2,3,4,5])
  3. >>> stack.append(8)
  4. >>> stack
  5. [5, 2, 3, 4, 5, 8]
  6. >>> stack.pop()
  7. 8
  8. >>> stack.pop()
  9. 5
  10. >>> stack
  11. [5, 2, 3, 4]
  12. >>> len(stack)
  13. 4
Advertisement
Add Comment
Please, Sign In to add comment