input: Write a function to extract book titles from a list of dictionaries.
  assert extract_titles(book_list) == ['The Hobbit', 'The Catcher in the Rye']
  assert extract_titles([]) == []
  assert extract_titles([{'title': '1984', 'author': 'George Orwell', 'pages': 328}]) == ['1984']
output: def extract_titles(book_list):
      return [book['title'] for book in book_list if 'title' in book]