📜  获取本地 ip - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.650000             🧑  作者: Mango

代码示例2
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)