Consider the following python code what is the output?

stack = []
stack.append('1')
stack.append('2')
stack.pop()
stack.append('3')
stack.append('4')
stack.pop()
stack.pop()
print(stack)

1
['1', '3']
2
['1']
3
[ ]
4
['1', '2', '3']

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation