input: Write a python function to convert a list of characters to their ASCII values.
  assert to_ascii(['a', 'b', 'c', 'd']) == [97, 98, 99, 100]
  assert to_ascii(['A', 'B', 'C', 'D']) == [65, 66, 67, 68]
  assert to_ascii(['1', '2', '3', '4']) == [49, 50, 51, 52]
output: def to_ascii(char_list):
      return [ord(char) for char in char_list]