发布时间:2019-08-26 07:20:06编辑:auto阅读(2206)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
50039
49296
39957
36996
31391
28233
27192
21982
21932
20265
365°
283°
266°
441°
435°
1048°
1959°
1818°
1459°
2925°