Amazon interview question

implement and test a stack in Python