三行Python代码查询IP

from socket import *
while 1:
    data=input('输入查询网址:')
    print(gethostbyname(data))