input: Write a function to sort a list of dictionaries by the 'price' key.
  assert sort_by_price([{'name': 'Pepsi', 'price': 2.99}, {'name': 'Sprite', 'price': 1.99}, {'name': 'Coca Cola', 'price': 3.99}]) == [{'name': 'Sprite', 'price': 1.99}, {'name': 'Pepsi', 'price': 2.99}, {'name': 'Coca Cola', 'price': 3.99}]
  assert sort_by_price([{'name': 'Fanta', 'price': 1.50}, {'name': 'Sprite', 'price': 1.99}, {'name': 'Pepsi', 'price': 2.00}]) == [{'name': 'Fanta', 'price': 1.50}, {'name': 'Sprite', 'price': 1.99}, {'name': 'Pepsi', 'price': 2.00}]
  assert sort_by_price([{'name': 'Water', 'price': 0.99}, {'name': 'Juice', 'price': 1.99}, {'name': 'Soda', 'price': 0.75}]) == [{'name': 'Soda', 'price': 0.75}, {'name': 'Water', 'price': 0.99}, {'name': 'Juice', 'price': 1.99}]
output: def sort_by_price(items):
      return sorted(items, key=lambda x: x['price'])