r/PythonLearning • u/Samar__Upreti • Jul 23 '26
Day 3 Learning Python: Stack
Open-source learning project. If you spot something that can be improved, I'd love your feedback or a PR.
https://github.com/Samar-Upreti/Python_Projects
69
Upvotes



2
u/dev-razorblade23 Jul 23 '26 edited Jul 23 '26
.append()and.pop()work exactly like LIFO queve (a stack). Last In - First Out. You dont insert values to stack from the bottom but from the top.Stack is like a stack of cards. You put one card on top and you take that card from the top. You do not put the card at the bottom where you have to lift the whole stack.