input: Write a function to create a string representation of a Book object.
  assert str(Book("1984", "George Orwell", "Secker & Warburg", 1949)) == "1984 was written by George Orwell and published by Secker & Warburg in 1949."
  assert str(Book("To Kill a Mockingbird", "Harper Lee", "J.B. Lippincott & Co.", 1960)) == "To Kill a Mockingbird was written by Harper Lee and published by J.B. Lippincott & Co. in 1960."
  assert str(Book("The Great Gatsby", "F. Scott Fitzgerald", "Charles Scribner's Sons", 1925)) == "The Great Gatsby was written by F. Scott Fitzgerald and published by Charles Scribner's Sons in 1925."
output: class Book:
      def __init__(self, title, author, publisher, year):
          self.title = title
          self.author = author
          self.publisher = publisher
          self.year = year
  
      def __str__(self):
          return f"{self.title} was written by {self.author} and published by {self.publisher} in {self.year}."