how to get the ordinal number in list
Steven D'Aprano
steve at pearwood.info
Mon Aug 11 04:55:40 EDT 2014
On Sun, 10 Aug 2014 23:22:45 -0700, Rustom Mody wrote:
> You think that the '=' sign not standing for math equality is ok.
>
> How come?
For the same reason that in the following:
[c.upper() for c in some_string if 'a' < c < 'x']
having the c symbol not stand for the speed of light is okay. Likewise,
in the sentence "I went to the park today", the symbol I doesn't mean the
element iodine. Symbols are context-dependent: the x in one equation is
not necessarily the same x in another equation, and the symbol = in one
context does not necessarily have the same meaning as in another context.
--
Steven
More information about the Python-list
mailing list