发布时间:2019-08-26 07:20:06编辑:auto阅读(2760)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
53755
40587
35014
30738
25605
25376
23813
19294
15409
14909
1484°
1364°
1466°
1497°
1510°
1689°
1648°
1529°
1631°
1581°