*sum([a<0 && b>=0 for (a,b) in zip(countlist,countlist[2:end])])*
Try that. I think it does what you want. You may also be interested in the .< and .<= operators.
*sum([a<0 && b>=0 for (a,b) in zip(countlist,countlist[2:end])])*
Try that. I think it does what you want. You may also be interested in the .< and .<= operators.