> Most of the time, filtering jobs like this can be accomplished by one- > liners using the right list combination and iteration tools: > > [c for c in enumerate(zip(l1,l2)) if c[1][0] ==c[1][1]]
You can even avoid the [1][0] stuff by using some nifty unpacking: [(c,ai) for c, (ai,bi) in enumerate(zip(a,b)) if ai == bi] Doug -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
