-->

Stacks & Queues In List

Question
CBSEENCO12011691

Write PUSH (Books) and POP (Books) methods in python to add Books and remove Books considering them to act as Push and Pop operations of Stack.

Solution
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())