import sys, socketresult = socket.getaddrinfo("www.google.com", None)counter = 0for item in result: print "%-2d: %s" % (counter, item[4]) counter += 1