what's the deal of "_" in Python?

Elaine Jackson elainejackson7355 at home.com
Thu Sep 16 22:43:15 EDT 2004


The python interpreter understands "_" as a reference to the last value it
computed, exactly analogous to "%" in the maple interpreter if you're familiar
with that. I think it's also used as a (loop-) variable name with the
implication that the variable will never be referenced. (Personally I like to
use the name "anonymous" for that purpose.)





More information about the Python-list mailing list