I have 2 issues with the code below:
Should I throw an exception if pop()
Stack follows LIFO mechanism.You can create a list and do a normal append() to append the element to list and do pop() to retrieve the element out of the list which you just inserted.
append()
pop()