What is the pythonic way to simply use one value or a few values when a function returns multiple values?

Viewed 36

I am using a python socket and one of the API of the socket is

 (clientsocket, address) = serversocket.accept()

My magic number way is

 connected_sock = serversocket.accept()[0]

However, I am interested only in client socket and not address. I can do so that there is just the client socket value and not address. What is the appropriate way in Python to do so that I can avoid magic numbers in my code?

1 Answers
Related