JLR Interview Question

Stack Implementation in python