def is_hexadecimal(string):
 return all(((ch in HEX_DIGITS) for ch in string))

def is_hexadecimal ( string ) : return all ( ( ( ch in HEX_DIGITS ) for ch in string ) )
checks whether a string is hexadecimal .