1import socket
2hostname = socket.gethostname()
3IPAddr = socket.gethostbyname(hostname)
4print("Your Computer Name is:" + hostname)
5print("Your Computer IP Address is:" + IPAddr)
6#How to get the IP address of a client using socket