input: Write a function to convert a list of books provided as ['title', 'author', 'pages'] into a dictionary where each book is represented as {'title': title, 'author': author, 'pages': pages}. Return this dictionary.
  assert book_to_dict([['The Hobbit', 'J.R.R. Tolkien', 295], ['The Catcher in the Rye', 'J.D. Salinger', 223]])==[{'title': 'The Hobbit', 'author': 'J.R.R. Tolkien', 'pages': 295}, {'title': 'The Catcher in the Rye', 'author': 'J.D. Salinger', 'pages': 223}]];
  assert book_to_dict([['1984', 'George Orwell', 328], ['To Kill a Mockingbird', 'Harper Lee', 281]])==[{'title': '1984', 'author': 'George Orwell', 'pages': 328}, {'title': 'To Kill a Mockingbird', 'author': 'Harper Lee', 'pages': 281}]];
  assert book_to_dict([['Pride and Prejudice', 'Jane Austen', 432]])==[{'title': 'Pride and Prejudice', 'author': 'Jane Austen', 'pages': 432}];
  assert book_to_dict([])==[];
output: def book_to_dict(books):
      return [{'title': book[0], 'author': book[1], 'pages': book[2]} for book in books]