Implement Stack Using Arraylist Leetcode Python