发布时间:2019-08-26 07:20:06编辑:auto阅读(2126)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
49136
48284
39010
36132
30541
27340
26342
21166
21012
19352
126°
133°
228°
413°
276°
940°
968°
958°
958°
918°