David Isaac wrote: > OK, this might do it. But is a generator "better"? > (I assume accuracy is the same, so what about speed?) > I have the slightest idea. So long it works for me and is not too hard to understand and has no obvious speed problem, I don't care too much. I believe in line is in general faster, especially you don't call other function too much.
I like to use generator/list because I find it easier to understand and it is more BD(bondage and discipline) which save me a few occasions of subtle errors. -- http://mail.python.org/mailman/listinfo/python-list