# Revision history [back]

I don't think Cython supports generators yet. In any case, changing

s=sum(l[j][1] for j in range(a))


to

s=sum([l[j][1] for j in range(a)])


solves the issue.