def iter_unique_scheme_hostname(urls):
 scheme_hostname = set()
 for x in urls:
  p = urlparse(x)
  scheme_hostname.add((p.scheme, p.hostname))
 return list(scheme_hostname)

def iter_unique_scheme_hostname ( urls ) : scheme_hostname = set ( ) for x in urls : p = urlparse ( x ) scheme_hostname . add ( ( p . scheme , p . hostname ) ) return list ( scheme_hostname )
return an iterator of tuples over the given urls .