on line 41, should be:
print(stack_obj.pop())
I have checked it there is not any error and it is also running perfectly fine. Please check it once again.