63310f4
1
2
3
import socket hostname = socket.gethostname() # Get the local machine name print(socket.gethostbyname(hostname)) # Get the local IP address