I have a text file , having fields delimited by ; in the first
line and all the way down is the data taken for those fields . Say
FAMILY NAME;SPECIES/SUBSPECIES;GENUS NAME;SUBGENUS NAME;SPECIES
NAME;SUBSPECIES NAME;AUTHORSHIP
Acrididae;Acanthacris ruficornis (Fabricius,
1787);Acanthacris;;r
@ Ulrich : Tx
@ Rebert : Appreciate your interpretation.
It made me think about ternary operation . Say
>>> (a > b) and x or y
Are all ternary operations prone to ...( in your words )
> It exploits short-circuit evaluation
>(http://en.wikipedia.org/wiki/Short-circuit_evaluat
I am a beginner in Python and would ask for a help.
I was searching for smaller version of code to calculate
factorial . Found this one
def fact(x):
return x > 1 and x * fact(x - 1) or 1
But I don't really get how ( x > 1 and x * fact(x - 1))
works .
--
http://mail