Please clarify why the following code does not remove 3 and 1.
a = [1,3,4,5]
for i in a:
if a!=[]:
print(a.pop())
else:
print('Stack empty')
1
Please clarify why the following code does not remove 3 and 1.
a = [1,3,4,5]
for i in a:
if a!=[]:
print(a.pop())
else:
print('Stack empty')
1