def is_hashable(arg):
 try:
  hash(arg)
 except TypeError:
  return False
 else:
  return True

def is_hashable ( arg ) : try : hash ( arg ) except TypeError : return False else : return True
return true if hash will succeed .