sockets in python the implementation of the client is given belowimport socket def main()print('starting client'print('create tcp/ip socket'sock socket socket(socket af_inetsocket sock_streamprint('connect the socket to the server port'server_address (socket gethostname() print('connecting to'server_addresssock connect(server_addressprint('connected to server'tryprint('send data'message 'johnprint('sending'messagesock send(message encode()data sock recv( decode(print('received from server'datafinallyprint('closing socket'sock close(if __name__ ='__main__'main(the output from the two programs needs to be considered together