#-*- encoding: utf-8 -*-
'''
Created on 2011-12-22
@author: Donze Yeap
'''
import socket
Website = raw_input('网址: ')
ip = socket.gethostbyname(Website)
print ip
网址: www.baidu.com
220.181.111.148
#-*- encoding: utf-8 -*-
'''
Created on 2011-12-22
@author: Donze Yeap
'''
import socket
Website = raw_input('网址: ')
ip = socket.gethostbyname(Website)
print ip
网址: www.baidu.com
220.181.111.148
转载于:https://www.cnblogs.com/Donze-Yeap/archive/2011/12/22/2298751.html