On Fri, Jun 26, 2015 at 1:59 AM, Ethan Furman <et...@stoneleaf.us> wrote: > My attempt at a lambda function fails: > > filter(lambda p: (p in c for c in contacts), main) > # ['291.792.9001', '291.792.9000'] > > Besides using a lambda ;) , what have I done wrong?
This looks like a job for a list comprehension! (Cue the swooping-in cape-wearing list comp, coming to save the day) ChrisA -- https://mail.python.org/mailman/listinfo/python-list