how to print host name in scket in python code example Example: get hostname socket socket.gethostbyname(socket.gethostname())