input: Write a function to sort a list of dictionaries by the "name" key.
  assert sort_by_name([{"name": "Charlie", "age": 25}, {"name": "Alice", "age": 30}, {"name": "Bob", "age": 22}]) == [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 22}, {"name": "Charlie", "age": 25}]
  assert sort_by_name([{"name": "Xander", "age": 40}, {"name": "Yara", "age": 35}, {"name": "Wendy", "age": 28}]) == [{"name": "Wendy", "age": 28}, {"name": "Xander", "age": 40}, {"name": "Yara", "age": 35}]
  assert sort_by_name([{"name": "Zoe", "age": 19}, {"name": "Liam", "age": 21}, {"name": "Emma", "age": 22}]) == [{"name": "Emma", "age": 22}, {"name": "Liam", "age": 21}, {"name": "Zoe", "age": 19}]
output: def sort_by_name(lst):
      return sorted(lst, key=lambda x: x["name"])