def isBin(s):
 for i in s:
  i = ord(i)
  if (i < 9):
   return True
  elif ((i > 13) and (i < 32)):
   return True
  elif (i > 126):
   return True
 return False

def isBin ( s ) : for i in s : i = ord ( i ) if ( i < 9 ) : return True elif ( ( i > 13 ) and ( i < 32 ) ) : return True elif ( i > 126 ) : return True return False
does this string have any non-ascii characters? .