Processing file with lists.

2010-11-25 Thread Geobird
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

Re: How on Factorial

2010-10-27 Thread Geobird
@ 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

How on Factorial

2010-10-26 Thread Geobird
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