发布时间:2019-08-26 07:20:06编辑:auto阅读(2170)
>>> import socket
>>> name = socket.gethostname()
>>> print name
***-***-***-**
>>> ip_addr = socket.gethostbyname(name)
>>> print ip_addr
10.***.*.*
上一篇: 【python】 倒序输出字符串
下一篇: Python除法运算和幂运算代码实例
49652
48871
39560
36610
31015
27842
26808
21622
21519
19874
580°
1018°
954°
934°
1901°
1057°
1739°
1964°
1554°
1517°