how to find hostname from ip address code example Example: get hostname socket.gethostbyname(socket.gethostname())