发布时间:2019-08-26 07:20:06编辑:auto阅读(2398)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
51714
51373
41804
38578
33058
30070
28737
23733
23645
22013
2228°
2913°
2436°
2384°
2954°
2385°
3193°
5246°
5059°
3612°