This stack implementation in python stores the max value then uses other stack functionalty. This is because python uses dynamic memory instead of static memory so that means not defining any initial max lenght for a data cluster(lists in pyhton). I fixed this unability by setting a max value in the beginning and then checking.