input: Write a python function to create a string representation of a Book object.
  assert str(Book("1984", "George Orwell", 328)) == "1984 by George Orwell (328 pages)"
  assert str(Book("To Kill a Mockingbird", "Harper Lee", 281)) == "To Kill a Mockingbird by Harper Lee (281 pages)"
  assert str(Book("The Great Gatsby", "F. Scott Fitzgerald", 180)) == "The Great Gatsby by F. Scott Fitzgerald (180 pages)"
output: class Book:
      def __init__(self, title, author, pages):
          self.title = title
          self.author = author
          self.pages = pages
          
      def __str__(self):
          return f"{self.title} by {self.author} ({self.pages} pages)"