Program For List Operation Using Stack: Source Code
Program For List Operation Using Stack: Source Code
SOURCE CODE:
book=[]
class Book:
def _init__(self):
self.num=0
self.name=''
def PUSH(self):
for i in range(num):
book.append(name)
def POP(self):
if(book==[]):
else:
a=Book()
while True:
if x==1:
a.PUSH()
elif x==2:
a.POP()
elif x==3:
break
else:
OUTPUT: