def ishexdigit(c):
  """
    >>> ishexdigit('0')
    True
    >>> ishexdigit('9')
    True
    >>> ishexdigit('/')
    False
    >>> ishexdigit(':')
    False
    >>> ishexdigit('a')
    True
    >>> ishexdigit('f')
    True
    >>> ishexdigit('g')
    False
    >>> ishexdigit('A')
    True
    >>> ishexdigit('F')
    True
    >>> ishexdigit('G')
    False
    """
  return c.isdigit() or ord('a') <= ord(c.lower()) <= ord('f')