Python Stack Quiz: Question 3

Last Updated :
Discuss
Comments

How would you implement the "push" operation on a stack in Python?

stack.insert(0, element)

stack.append(element)

stack.add(element)

stack.addFront(element)

Share your thoughts in the comments