📜  如何使用python代码示例获取笔记本电脑的IP地址

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

代码示例1
#firstly import socket
import socket
#it is important to get host name get it
host_name = socket.gethostname()
ip_adress = socket.gethostbyname()
print("Ip address of",hostbyname,"is",ip_adress