Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> stack = list()
- >>> stack.extend([5,2,3,4,5])
- >>> stack.append(8)
- >>> stack
- [5, 2, 3, 4, 5, 8]
- >>> stack.pop()
- 8
- >>> stack.pop()
- 5
- >>> stack
- [5, 2, 3, 4]
- >>> len(stack)
- 4
Advertisement
Add Comment
Please, Sign In to add comment