Suppose I have 2 lists which are the x and y co-ordinates of points. Now I want to send the 2 lists through sockets to other computers on a network. Because I want to send lists, I append the lists in a list to form a list of lists and then send the data.
1.As they are lists, do I need to pickle them?
2.At the receiver's side how do I unpickle the lists and store the values in 2 different lists?
The example illustrating the situation is given below:
listx=[1,2,3]
listy=[4,5,6]
list_to_send.append(listx)
list_to_send.append(listy)
print list_to_send=>[[1,2,3],[4,5,6]]
Send the list to the reciever
At the receiver:
a=socket.recv(1024)
Now how to unpickle and differentiate the lists?