sort one list using the values from another list

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue Feb 28 06:00:20 EST 2006


>_ is just a plain variable name in Python. It is sometimes when a variable is needed to receive a value that won't be used.<

Like in some other interactive systems (Mathematica, etc, but with a
different syntax) _ has a use in the interactive shell, it contains the
last unassigned result:

>>> a = 2 * 5
>>> _
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
NameError: name '_' is not defined
>>> 2 * 5
10
>>> _
10

Bye,
bearophile




More information about the Python-list mailing list