发布时间:2019-08-26 07:20:06编辑:auto阅读(2252)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
50508
49811
40412
37425
31846
28714
27643
22423
22423
20736
504°
1118°
912°
845°
1094°
969°
1584°
2949°
2631°
2021°