SAP interview question

Insert an element into a stack Python code