Top of the stack
Write push_and_peek(stack, item) that pushes item onto the stack (a
list) and returns whatever is now on top.
push_and_peek(["a", "b"], "c") -> "c"
def push_and_peek(stack, item):
...
Write push_and_peek(stack, item) that pushes item onto the stack (a
list) and returns whatever is now on top.
push_and_peek(["a", "b"], "c") -> "c"
def push_and_peek(stack, item):
...