【Python】由host得到IP
代码:import sockethost='www.163.com'ip=socket.gethostbyname(host)print('Ip of {} is {}'.format(host,ip))输出:C:\Users\horn1\Desktop\python\51-gethostip>python gethostip.pyIp of ww...