get ip of the host address code example Example: get hostname socket.gethostbyname(socket.gethostname())