Connect and send the data

Report a typo

In the code below, you are given a function submit_data() that takes data, a client socket, and a connection address.

Finish the code by connecting the socket to this address and sending the data to the server. The data has the str type, so you may need to convert it to bytes first. The client variable is an existing socket.

You don't have to receive any response from the server, however, it might be a good idea to end the connection, when you're done.

Just implement the function, no other actions are required.

Write a program in Python 3
def submit_data(data, client, address):
pass
___

Create a free account to access the full topic