Get the response

Report a typo

Read through the following code and add a single line below to get the response of the server.

import socket

yet_another_socket = socket.socket()
yet_another_socket.connect(('localhost', 1025))
data = b'How deep does the rabbit socket go?'
yet_another_socket.send(data)
buffer_size = 1024

Save the received data in a variable response.

Enter a short text
___

Create a free account to access the full topic