Stack operations
from collections import deque
stack=deque()
while True:
print("A To insert Element in the stack")
print("B To pop Element from the stack")
print("C Print all elements")
print("D Exit")
i=input("Enter Your option :")
if i in ("A","a"):
t=input("Enter Element to be inserted :")
stack.append(t)
elif i in ("B","b"):
print("Popped Element is ",stack.pop())
elif i in ("C","c"):
print("Element In the stack")
for x in stack:
print(x,end="\t")
print()
elif i in ("D","d"):
break
else:
continue