input: Write a python function to sort a list of dictionaries by a specified key.
  assert sort_list_of_dicts_by_key([{'name': 'Alice', 'age': 25}, {'name': 'Bob', 'age': 20}], 'age') == [{'name': 'Bob', 'age': 20}, {'name': 'Alice', 'age': 25}]
  assert sort_list_of_dicts_by_key([{'name': 'Charlie', 'age': 30}, {'name': 'Alice', 'age': 25}], 'name') == [{'name': 'Alice', 'age': 25}, {'name': 'Charlie', 'age': 30}]
  assert sort_list_of_dicts_by_key([{'name': 'Alice', 'age': 25}, {'name': 'Bob', 'age': 20}, {'name': 'Charlie', 'age': 30}], 'age') == [{'name': 'Bob', 'age': 20}, {'name': 'Alice', 'age': 25}, {'name': 'Charlie', 'age': 30}]
output: def sort_list_of_dicts_by_key(lst, key):
      return sorted(lst, key=lambda x: x[key])