input: Write a function to encode a string to its hexadecimal representation.
  assert encode_string("hello") == "68656C6C6F"
  assert encode_string("world") == "776F726C64"
  assert encode_string("test") == "74657374"
output: def encode_string(s):
      return ''.join(format(ord(c), '02X') for c in s)