Typically, you name a variable with a single underscore when you no longer need to refer to that variable. For example, something like this:
for _ in range(10):
print "hello"
It just prints hi 10 times, and we don’t need to refer to the loop control variable ( _in this case).
In your example, it select.select(sockets, [], [])returns a tuple (or list or set), from which you seem to need only the first element, so you use underscores.
source
share