Write Add new(Book) and Remove(Book) methods in Python to Add a new Book and Remove a Book from a List of Books, considering them to act as PUSH and POP operations of the data structure stack.
Answer:
def addnew(Books):
str=input(print("Enter a book's name: "))
Books.append(str)
def remove(Books):
if len(Books)==0:
print("Stack is empty")
else:
Books.pop()