input: Write a function that takes a list of lists as input, where each inner list contains three elements: the title of a book, the author of the book, and the number of pages of the book. The function should convert this input into a list of dictionaries, where each dictionary contains the keys 'title', 'author', and 'pages' corresponding to the respective elements from the inner lists.
  
  def books_to_dict(books):
      return [{'title': book[0], 'author': book[1], 'pages': book[2]} for book in books]
  
  assert books_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},
  ]
output: def books_to_dict(books):
      return [{'title': book[0], 'author': book[1], 'pages': book[2]} for book in books]