Python stacks example
stack = [1, 2, 3, 4, 5] stack.append(6) print(stack) >>> [1, 2, 3, 4, 5, 6] stack.pop() >>> 6 print(stack) >>> [1, 2, 3, 4, 5] stack.pop() >>>5 print(stack) >>>[1, 2, 3, 4]
Not a member yet? Register now
Are you a member? Login now