def check_resolve(host):
 try:
  dummy = socket.getaddrinfo(host, None)
 except:
  return False
 return True

def check_resolve ( host ) : try : dummy = socket . getaddrinfo ( host , None ) except : return False return True
return true if host resolves .