program to implement stack for book details(book no, book name). implement push and display operation code example
Example: program to implement stack for book details(book no, book name). implement push and display operation
def push(Books):
Stack.append(Books)
print 'Element:', Book, 'inserted successfully'
def pop():
if Stack == []:
print('Stack is empty!')
else:
print('Deleted element is',Stack.pop())