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']
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)