发布时间:2019-08-26 07:20:06编辑:auto阅读(2694)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
53256
40135
34515
30254
25166
24955
23354
16884
14957
14468
845°
769°
841°
849°
900°
1026°
1015°
1013°
1120°
1035°