input: Write a python function to validate if a given string is a valid hex color code.
  assert is_valid_hex_color("#FFFFFF") == True
  assert is_valid_hex_color("#FFF") == True
  assert is_valid_hex_color("#123456") == True
  assert is_valid_hex_color("#123") == True
  assert is_valid_hex_color("123456") == False
  assert is_valid_hex_color("#12345G") == False
output: def is_valid_hex_color(s: str) -> bool:
      if s.startswith('#'):
          s = s[1:]
          if len(s) == 6 or len(s) == 3:
              return all(c in '0123456789ABCDEFabcdef' for c in s)
      return False