You are viewing a single comment's thread from:

RE: Data Structures in Python - Part 1- Stacks

in #coding7 years ago (edited)

I was just wondering, why would I need stack, why is so important that something, that gets last in, comes first out. OK, undo is a great example, I see. Although I would still (as beginner) think that simple list should do also, with added benefit, that i can pull something else out of I ever need. :-) But I guess, there are cases where stack fits better than anything else, including my list ;-)

Classes are still something above my pay grade, but code you linked to, seems simple (well short) enough I will try it out and try to understand it. Thanks for sharing!