Ask your own question, for FREE!
Mathematics 9 Online
OpenStudy (anonymous):

How would you implement a stack in python, or is it built-in in some form?

OpenStudy (anonymous):

I think the default lists work well as stack objects, or am I mistaken?

OpenStudy (anonymous):

Yeah, the defined operations for a stack (last-in first-out) work fine with the list methods in Python, ,more precisely, list.append() and list.pop().

OpenStudy (anonymous):

so the default lists work :-D

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!