input: Write a python function to convert a list to JSON format.
  assert list_to_json([1, 2, 3]) == '[1, 2, 3]'
  assert list_to_json(['a', 'b', 'c']) == '["a", "b", "c"]'
  assert list_to_json([{'key': 'value'}, {'key2': 'value2'}]) == '[{"key": "value"}, {"key2": "value2"}]'
output: import json
  
  def list_to_json(lst):
      return json.dumps(lst)