发布时间:2019-08-26 07:20:06编辑:auto阅读(2667)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
53110
40031
34413
30164
25063
24859
23241
16721
14872
14365
709°
659°
721°
740°
785°
913°
883°
898°
992°
917°