I have seen this in a few contexts, e.g.,
in sequence unpacking:
_, x = L.pop() # e.g., L is a list of tuples
to initialize a container:
X = _
So obviously this is not an element of the formal python syntax, rather the uses i am aware of appear discretionary.
So I'm curious what is the likely reason for its use and what are the advantages generally (if any)?
Note: my question relates to the use of "_" in scripts, modules, etc., but not its use at the interactive prompt. In IDLE, the interactive interpreter packaged with python, as well as in ipython, "_", is used as a placeholder for most recently returned result).