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